Forum Discussion
How to list azure AD groups for a user using Power shell
Hi,
Could you please help me how to get list of azure AD groups for a user using power shell.
Thanks,
Brahma
Hi Brahmaiah
I use the below:
Get-AzureADUser -SearchString user@domain.com | Get-AzureADUserMembership | % {Get-AzureADObjectByObjectId -ObjectId $_.ObjectId | select DisplayName,ObjectType,MailEnabled,SecurityEnabled,ObjectId} | ft
Where the user@domain.com is the UPN of who you want to search. This will return all groups aside from Dynamic groups.
- HidMovSteel Contributor
Hi Brahmaiah
I use the below:
Get-AzureADUser -SearchString user@domain.com | Get-AzureADUserMembership | % {Get-AzureADObjectByObjectId -ObjectId $_.ObjectId | select DisplayName,ObjectType,MailEnabled,SecurityEnabled,ObjectId} | ft
Where the user@domain.com is the UPN of who you want to search. This will return all groups aside from Dynamic groups.