In this article, you will learn how to export Microsoft Entra ID users with PowerShell and 365 Admin Center.
An exported list of Entra ID users can be useful to very user information, reporting or to import users into another system.
Export Entra ID Users With 365 Admin Center
Step 1: Log into Microsoft 365 Admin Center
On the left side, go to Users > Active Users

Step 2: Click Export Users at the top of the page.

It may take some time to export depending on the number of users you have in your environment.
Export Entra ID Users with PowerShell
Before running the command to export users you must first connect to Microsoft Graph.
Connect-MgGraph -Scopes "User.Read.All"
Now that you are connected, run the command below to export your users to CSV.
Get-MgUser -All | Select-Object DisplayName, UserPrincipalName, Mail, ID, AccountEnabled, GivenName, Surname, JobTitle, Department, CompanyName, OfficeLocation, EmployeeID, MobilePhone, BuisnessPhones, StreetAddress, City, PostalCode, State, Country, UserType | Export-Csv -Path "C:\it\EntraUsers.csv" -NoTypeInformation
This will save a file named EntraUsers.csv to your selected path, showing info like name, username, email, and whether the account is active.

The CSV file will now be in path you put in the command.
