Get Role Member – Azure Active Directory
Using below Script to get the member of particular Azure Active Directory.
connect-azuread #get all groups Get-AzureADDirectoryRole | select displayname $role = Get-AzureADDirectoryRole | Where-Object {$_.displayName -eq 'Company Administrator'} Get-AzureADDirectoryRoleMember -ObjectId $role.ObjectId | Get-AzureADUser | select displayname,user principalname | Export-Csv "C:\Users\nkcode\Downloads\members.csv" -NoType