Export user from azure group

Ravi 21 Reputation points
2022-11-19T10:34:03.807+00:00

Hello expert.
Please help me to export user list from specific azure group including the country name.
Thanks in advance..

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
14,808 questions
0 comments No comments
{count} votes

Accepted answer
  1. Manu Philip 14,551 Reputation points MVP
    2022-11-19T11:54:27.597+00:00

    You can easily export the list as a csv file with the required attributes by the following procedure

    1. Connect Azure AD: Connect-AzureAD -TenantId <ID>
    2. Identify the object name of the group : Get-AzureADGroup | ? {$_.DisplayName -eq "team1"}
    3. Select the required fields. Available fields are as below: ExtensionProperty
      DeletionTimestamp
      ObjectId
      ObjectType
      AccountEnabled
      AgeGroup
      AssignedLicenses
      AssignedPlans
      City
      CompanyName
      ConsentProvidedForMinor
      Country
      CreationType
      Department
      DirSyncEnabled
      DisplayName
      FacsimileTelephoneNumber
      GivenName
      IsCompromised
      ImmutableId
      JobTitle
      LastDirSyncTime
      LegalAgeGroupClassification
      Mail
      MailNickName
      Mobile
      OnPremisesSecurityIdentifier
      OtherMails
      PasswordPolicies
      PasswordProfile
      PhysicalDeliveryOfficeName
      PostalCode
      PreferredLanguage
      ProvisionedPlans
      ProvisioningErrors
      ProxyAddresses
      RefreshTokensValidFromDateTime
      ShowInAddressList
      SignInNames
      SipProxyAddress
      State
      StreetAddress
      Surname
      TelephoneNumber
      UsageLocation
      UserPrincipalName
      UserState
      UserStateChangedOn
      UserType
    4. Export the list: Get-AzureADGroup -ObjectId "ID" | Get-AzureADGroupMember | select DisplayName,Country,MailNickName,UserType | Export-Csv -nti list.csv

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ravi 21 Reputation points
    2022-11-22T00:11:41.337+00:00

    Hello @Manu Philip
    The command is working perfectly but it doesn’t export all the users
    Exporting only 100 users