logo
search
Others

How to Generate a Report of Microsoft 365 Group Members

Adam DavisAdam Davis Sep 30, 2026 869 views

Question details

The user needs to extract a list of members from Microsoft 365 groups, including bulk exports of hundreds of groups to a single report instead of running manual queries for each.

How to Generate a Report of Microsoft 365 Group Members
Product
Microsoft 365
Device & OS
not provided
Scenario
An IT administrator needs to audit group memberships or generate a bulk CSV report covering all distribution lists, security groups, and Microsoft 365 groups.
Observed behavior
Manual exporting is inefficient for multiple groups, prompting the need for a bulk extraction method using PowerShell or admin tools to output group names, member names, and emails.
Before you start

Ensure you have Global Administrator or Exchange Administrator privileges in Microsoft 365, and verify that the Microsoft Graph PowerShell module is installed on your computer.

Solution 1Recommended

Use Microsoft Graph PowerShell to Export All Group Members to CSV

The most efficient way to generate a bulk report for hundreds of Microsoft 365 groups is by using a Microsoft Graph PowerShell script that iterates through all groups and exports the data to a CSV file.

Microsoft Graph PowerShell replaces older modules like MSOnline and AzureAD. By scripting the extraction process, you can easily pull the group name, member name, email address, and membership type into a single, organized CSV file for auditing.

1
Open PowerShell as Administrator

Search for Windows PowerShell in your Start menu, right-click on it, and select 'Run as administrator'.

2
Install and Connect to Microsoft Graph

If you haven't already, run 'Install-Module Microsoft.Graph -Scope CurrentUser'. Then, connect to your tenant by running 'Connect-MgGraph -Scopes "Group.Read.All", "GroupMember.Read.All"' and signing in with your admin credentials.

3
Run the Group Retrieval Script

Use a script utilizing 'Get-MgGroup -All' to fetch all groups, and then a 'foreach' loop to process each group. Inside the loop, use 'Get-MgGroupMember -GroupId $group.Id -All' to retrieve the members of that specific group.

4
Export Results to CSV

Format the retrieved variables into custom PSObjects and pipe the final array of results into the 'Export-Csv -Path "C:\GroupReport.csv" -NoTypeInformation' cmdlet to generate your bulk report.

Use Microsoft Graph PowerShell to Export All Group Members to CSV
Script Optimization: For large tenants with thousands of groups, generating the report may take some time. Consider adding a progress bar ('Write-Progress') to your script or filtering groups by specific types to speed up execution.
Free Microsoft Office alternative

Open and Analyze Your CSV Reports with WPS Office

After exporting your Microsoft 365 group members to a CSV file, you need a reliable spreadsheet tool to view, filter, and analyze the data. WPS Office is a powerful, free, and lightweight alternative to Microsoft Office that perfectly handles CSV and Excel files, making it easy to manage your administrative reports.

  1. 1. Install WPS Office: Download WPS Office for free from the official website and complete the quick installation process.
  2. 2. Open Your Report: Launch WPS Spreadsheets, click 'Open', and select the CSV file generated by your PowerShell script or the M365 Admin Center.
  3. 3. Format and Analyze: Use WPS Spreadsheets' sorting, filtering, and conditional formatting features to easily identify specific group members or anomalies in your report.
100% compatible with Microsoft Excel formats, including .csv, .xlsx, and .xls.Lightweight software that quickly opens massive CSV files without lagging.Familiar spreadsheet interface with built-in data filtering and pivot tables.Free to use, offering a perfect alternative for users without a local Office license.
microsoft office alternative - wps office

Frequently Asked Questions

Can I export nested group members in Microsoft 365?

Yes, but it requires a more advanced PowerShell script. Standard cmdlets like 'Get-MgGroupMember' only pull direct members. To list nested members, your script must check if a member is a group itself and then recursively query that nested group's members.

Why is my PowerShell script returning limited results for large groups?

Microsoft Graph API implements pagination for performance reasons. If a group has many members, you must ensure your PowerShell command includes the '-All' parameter (e.g., Get-MgGroupMember -All) so it pages through and retrieves the complete member list.

Can I export members of a Dynamic Distribution Group using this method?

No, Microsoft Graph PowerShell group commands do not retrieve members of Dynamic Distribution Groups because their membership is calculated based on rules at the time of email delivery. You must use Exchange Online PowerShell cmdlets, such as 'Get-DynamicDistributionGroup' and 'Get-Recipient', to evaluate and export those members.

What permissions are required to run the Microsoft Graph PowerShell script?

To read all groups and their memberships across your tenant, you need to connect to Microsoft Graph with the 'Group.Read.All' and 'GroupMember.Read.All' scopes. An account with Global Administrator, Groups Administrator, or Global Reader roles will have sufficient access to consent to these scopes.