Query AAD for all members of a group
To query AAD for all members of a group (note that the -All flag does not retrieve all users – try the -Top option instead)
Get-AzureADGroupMember -ObjectId "my_obect_id" -Top 200000 | Export-csv -path .\allusers.csv -NoTypeInformation Get-AzureADGroupMember -ObjectId "my_object_id" -Top 200000 | Select-Object -ExpandProperty UserPrincipalName
Summary
The AD powershell method – GetADGroupMember is replaced with the Azure AD equivalent (GetAzureADGroupMember). The -All option was found to be unreliable. In it’s stead, use the -Top LARGE_NUMBER