Get Microsoft 365 Group reports using powershell
The Get-MsolGroup cmdlet gets groups from Azure Active Directory. This cmdlet can be used to return a single group, if you specify the ObjectId parameter, or to search within all groups.
- [-UserObjectId <Guid>]
- [-UserPrincipalName <String>>
- [-GroupType <GroupType>>
- [-HasLicenseErrorsOnly <Boolean>]
- [-SearchString <String>]
- [-MaxResults <Int32>]
- [-TenantId <Guid>]
Example 1: Get a group by using an ID
1 Get-MsolGroup -ObjectId af407072-7at6-4b07-a0ca-6634b7396
This script returns the group object that has the specified ID.
Example 2: Get all groups
This script returns all the groups of the tenant, up to the default 250 results.
Example 3: Get agent groups using user principal name
1 Get-MsolGroup -isAgentRole -UserPrincipalName "firstname.lastname@example.org"
This script returns the agent groups in which the user is a memmber. This only applies for companies that have partner privileges.
Get Microsoft 365 group reports with M365 Manager Plus
As you can see in the examples above, one needs to run multiple scripts to retrieve data based on the requirements. And the PowerShell scripts get longer with the granularity of the data to be fetched.
M365 Manager Plus on the other hand offers built-in reports on Microsoft 365 that can be viewed in a single click. Whatever be the service you need to view reports on, all are available under a single roof.
The categories of group reports provided by M365 Manager Plus include:
- General group reports.
- Member based reports.
- Group type reports.
- Group usage reports.
The highlights of M365 Manager Plus' reports:
- Advanced filters: Use attribute and condition-based filters to get the data you need without lengthy PowerShell scripts.
- Reports on historical data: PowerShell cmdlets can only retrieve data that's at least seven days old and no older than 180 days. But M365 Manager Plus reports can fetch all data right from the date of installation.
- Customizable dashboard: M365 Manager Plus dashboard is customizable. Add reports in graph format to get a quick peek at the mail traffic summary, top email senders and receivers, client device usage, and more. This dashboard can be embedded in any of your web pages to enable constant monitoring.
- Report scheduler: Reports can be scheduled to be generated at regular intervals to reduce the overhead of generating reports manually.
- Report export: The reports can be exported to PDF, XLS, HTML, or CSV formats and emailed to the administrator.
- Secure delegation: Securely delegate the task of report generation to technicians and IT staff without giving them full access to the Microsoft 365 Admin Center.