Keeping an eye on group memberships in Microsoft Entra ID is essential for ensuring that the right users and devices have the appropriate permissions to resources. IT teams often need to retrieve group members to audit permissions, enforce access control, or manage access rights within the organization. Microsoft Graph PowerShell commands like Get-MgGroupMember allow administrators to list group members, but this process requires complex scripts and manual effort.
On the other hand, ManageEngine ADManager Plus offers a streamlined, script-free solution for retrieving and managing group memberships. With several built-in reports and management actions, you can easily view, modify, and track Microsoft Entra ID group members without the need for scripting.
Filter the report based on domains and groups.
Schedule automatic report generation and export to various formats.
Filter the report further according to the requirement.
Before running the Get-MgGroupMember cmdlet, ensure the following requirements are met:
Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes "GroupMember.Read.All", "Group.Read.All"
Use the Get-MgGroupMember cmdlet in Microsoft Graph PowerShell to get a list of Microsoft Entra ID group members. The syntax is as follows:
Get-MgGroupMember
-GroupId <String>
[-ExpandProperty <String[]>]
[-Filter <String>]
[-Property <String[]>]
[-Search <String>]
[-Skip <Int32>]
[-Sort <String[]>]
[-Top <Int32>]
[-ConsistencyLevel <String>]
[-ResponseHeadersVariable <String>]
[-Headers <IDictionary>]
[-PageSize <Int32>]
[-All]
[-CountVariable <String>]
[-ProgressAction <ActionPreference>]
[<CommonParameters>]
Example: Get members of a group
Get-MgGroupMember -GroupId "your-group-id"
The table below lists key parameters that can be used with the Get-MgGroupMember cmdlet to get Microsoft Entra ID group members.
| Parameters | Description |
|---|---|
| -All | This lists all pages. |
| -ConsistencyLevel | This shows the requested consistency level. |
| -CountVariable | This indicates the count of the total number of items in a collection. By default, this variable will be set in the global scope. |
| -Filter | This filters the items by property values. |
| -GroupID | This is the unique identifier of a group. |
Note: Microsoft has announced the deprecation of Azure AD PowerShell and its transition to Microsoft Graph PowerShell.