azureazure-active-directoryazure-ad-powershell-v2

Get all users for the Azure AD group in Azure CLI - 100 limit issue


I'm looking for a way to retrieve information about all users that belong to a particular group and store the results in CSV.
So, I use the following Azure AD command for the purpose:

Get-AzureADGroupMember -ObjectId "xxx" | get-azureaduser | Export-Csv -nti users.csv

However, the command only returns 100 users maximum.
Is there a way to return all the users that belong to a group from the CLI?


Solution

  • Try Get-AzureADGroupMember -ObjectId "xxx" -all $true | ...

    Look at https://learn.microsoft.com/en-us/powershell/module/azuread/get-azureadgroupmember?view=azureadps-2.0 for reference