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.

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,449 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,332 questions
{count} votes

Accepted answer
  1. Monalla-MSFT 12,861 Reputation points
    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.