Forum Discussion

Dino_Vo's avatar
Dino_Vo
Copper Contributor
Jan 26, 2022
Solved

Powershell + AAD

Hi, I would need advice/help for my problem. I have 1 Enterprise application. Members of that EA are cloud-only groups (over 100 groups). Is there anyway I can get list of groups using powershell ...
  • Harm_Veenstra's avatar
    Jan 26, 2022

    Dino_Vo 

    Used Get all Azure AD Applications, Permissions and Users using Powershell (morgantechspace.com) to get the users associated with an Enterprise Application, but it just listed the groups 

     

    Tweaked it a little bit 😉 

     

    ForEach ($group in Get-AzureADServiceAppRoleAssignment -ObjectId 70a91c6d-b43d-4c7d-9e6f-1615656733e9) {Get-AzureADGroup | Where-Object DisplayName -Match $group.PrincipalDisplayName | Get-AzureADGroupMember}

     

    (Edit with your own Enterprise Application object-id of course 😉 )

Resources