Forum Discussion
Dino_Vo
Jan 26, 2022Copper Contributor
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 (users/members) who are members of that Enterprise application?
KR,
Dino
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 😉 )
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 😉 )