Report Tenant Users - directorcia/Office365 GitHub Wiki

Script = graph-users-get.ps1

Microsoft 365 User Report Script

This PowerShell script is designed to generate a report on users in a Microsoft 365 tenant using the Microsoft Graph API. Here's a detailed explanation of its operation and purpose:

Parameters:

The script accepts three optional parameters:

  • $debug: Enables debug mode, which logs script activity.
  • $csv: Exports the report to a CSV file.
  • $prompt: Prompts the user for input at various stages.

Metadata and Documentation:

  • The script includes a disclaimer, description, source URL, and documentation URL.
  • It mentions a prerequisite: ensuring the MS Graph module is installed.

Support Information:

  • The script provides links for supporting the author through Ko-fi or becoming a CIAOPS Patron.

The primary purpose of this script is to connect to Microsoft Graph, retrieve information about users in a Microsoft 365 tenant, and display or export this information in a user-friendly format.

  • The script ensures proper logging and provides feedback to the user through optional prompts and debug messages.
  • The actual logic for connecting to Microsoft Graph, retrieving user data, and processing the results would be implemented in the subsequent lines of the script, which are not visible in the provided excerpt.