How to get Azure group memberships

Sergei Stepanov 27 Reputation points
2024-02-21T00:43:21.8133333+00:00

There is an option to get all groups for specific user with Get-AzureADUserMembership cmdlet. But how to get memberships for the group? For AD there is a cmndlet called Get-ADPrincipalGroupMembership, but I cannot find similar cmdlet for Azure EntraID.

Windows for business | Windows Server | User experience | PowerShell
Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

Accepted answer
  1. Monalla-MSFT 13,071 Reputation points Moderator
    2024-02-21T02:09:03.65+00:00

    @Sergey Stepanov - Welcome to Microsoft Q&A and thanks for reaching out to us.

    Microsoft Graph PowerShell supports functionalities and features from MSOnline and Azure AD PowerShell. Microsoft Graph PowerShell or API does not have a direct mapping for that command. See if you can use this command:

    Get-MgGroupMemberOfAsGroup -GroupId $groupId

    User's image

    It will list the group membership for a given group.

    Hope this helps. If the above response was helpful, please feel free to "Accept as Answer" and click "Yes" so it can be beneficial to the community.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.