Export users list from Azure AD Group

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>
    • Identify the object name of the group : Get-AzureADGroup | ? {$_.DisplayName -eq "team1"}
    • Select the required fields to be exported in the csv file from the below list of attributes
      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
    • Export the list as a csv file under C:\tmp\Get-AzureADGroup -ObjectId "ID" | Get-AzureADGroupMember -All $true | select DisplayName,Country,MailNickName,UserType | Export-Csv -nti C:\tmp\list.csv

    Tags:

    No responses yet

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Recent Comments
    Add External Contacts in Microsoft Teams