Export user from azure group

Ravinder Kumar 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..

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,619 questions
0 comments No comments
{count} votes

Accepted answer
  1. Manu Philip 16,986 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. Ravinder Kumar 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