Get-AzureADUserMembership
This article provides migration details from Get-AzureADUserMembership command to Microsoft Graph PowerShell.
Summary
- Azure AD Command: Get-AzureADUserMembership
- Azure AD Module: AzureAD
- Microsoft Graph Command: Get-MgUserMemberOf (Community Examples)
- Graph Module: Microsoft.Graph.Users
- Graph Endpoint: GET /users/{id | userPrincipalName}/memberOf
Permissions
Permission type | Least privileged permissions | Higher privileged permissions |
---|---|---|
Delegated (work or school account) | User.Read | Directory.Read.All, Directory.ReadWrite.All, GroupMember.Read.All |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | Not supported. | Not supported. |
Note: To list the members of a group with hidden membership, the Member.Read.Hidden permission is required.
View more details on permissions.
Property Mapping
Azure AD Name | Microsoft Graph Name |
---|---|
ObjectId | UserId |