Export Licensed Users from Office 365 to CSV Format
IT admins may require the list of users in their Office 365 tenants for many reasons. But what if you don’t know how to do it? Here, I am going to provide you three ways to export a users list from Office 365. Properly follow them to avoid any mistakes.
Table of Content
As an IT professional, my usual work is to manage my organization’s departments in Office 365. For the upcoming audits, I need to export the complete list of all the users. I prefer to export the list into a CSV file for easy sorting and filtering. Can you help me by providing easy and simple ways to get the Microsoft 365 user lists? That would be a huge help. Thank you!
There are many professionals who are having issues getting the list of users. Because of the complexities of user management in Microsoft 365. Complex licensing structure, unclear role-based access controls, and many more issues. Make it difficult for you to get your users list. But don’t worry, I am going to help you in this situation. Before I will explain the methods. Let’s see the scenarios where you need to export a users list from Office 365.
Why Export the List of Users from Microsoft 365?
The user list contains all the necessary details of the users in the Microsoft tenant. Like details of user accounts, roles, and license usage. These details are essential for various purposes, such as.
- Whenever the organizations are conducting the audit for Microsoft 365. They need a proper record of all the user accounts in the organization’s account.
- To monitor the active or inactive users and for better control, you must know all the information of your users.
- License tracking can be done from this list of users. Here, you can find out how the license is assigned to the users and identify the unused license usage.
- If you are offboarding or onboarding, then you must have the complete users list of Microsoft 365.
- You can create a custom report for management or planning.
- If you are shifting from cloud services to on-premise environments. Then, you need to require a proper list of all the users to move them to your local server.
Therefore, there are various cases where you need to have a user list. So, in order to get the list. Follow the methods mentioned below.
Get a List of Licensed Users in Office 365 Using Admin Center
From your admin portal, you can easily export the user list. The method of doing it is simple. Just follow the steps below.
- Log in to the Microsoft 365 Admin Center using the admin credentials.
- Go to the Users section and select the Active users option.
- You can use the filter icon to sort out licensed users.
- Click on the three dots beside the search bar.
- Select Export User and click on the Continue button.
This is the easiest way to export your users list from Office 365. But there is an advanced option that a skilled IT admin can easily do.
Export List of Users from Microsoft 365 to CSV with PowerShell
In this method, make sure you have enabled MFA. Install PowerShell version 7 or later and Microsoft Graph PowerShell SDK.
- To get the Microsoft Graph PowerShell SDK, run this command in PowerShell: Install-Module Microsoft.Graph -Scope AllUsers
- Then, connect to Office 365 from this command: Connect-MgGraph -Scopes “User.Read.All”
- Sign in to the Microsoft 365 account with proper admin credentials.
- To export all the users, you can use this script: Get-MgUser -All | Select-Object DisplayName, UserPrincipalName, Mail | Export-Csv -Path “C:\Users\YourUsername\Documents\UsersReport.csv” -NoTypeInformation
- If you only want the licensed users, type this command: Get-MgUser -Filter ‘assignedLicenses/$count ne 0’ -ConsistencyLevel eventual -CountVariable licensedUserCount -All -Select UserPrincipalName,DisplayName,AssignedLicenses | Format-Table -Property UserPrincipalName,DisplayName,AssignedLicenses
By using these commands, you can easily get your Microsoft 365 users list. However, users who don’t have enough skill have difficulty in exporting the contacts. Thus, to make the process easier, I have a professional technique.
Save Office 365 Users List by Professional Option
If you are having problems exporting the user list. Then, try SysTools Office 365 Export Tool. This tool makes the process easier by saving bulk users contact lists in the appropriate contact format. Here you must have the admin credentials. Then, follow the below steps to properly get your required list. Carefully follow the working steps of the software.
Steps to Export Users List from Office 365
- Download and install the software. After activating the software, go to the setup dashboard.
- Choose Office 365 from the source and click on the File System as the dashboard.
- Select the Contacts option. Then, provide the Microsoft 365 admin email and application ID. Validate the account.
- Set a destination location and give a name to the exported file. Validate the settings.
- To get the users list, I can either fetch users or import the users.
- The Fetch user automatically fetches all the users from your account.
- In Import users, you first have to download the template. Add your user details. Then, upload it to software.
- Click on the validate button to verify your user account. Then, click on the Start Export button.
Frequently Asked Queries
Yes, you can export the list of unlicensed Office 365 users. Similar to the licensed users’ power shell provide the command “ Get-MsolUser – All -UnlicensedUsersonly ” to obtain the list of Office 365 unlicensed.
Yes, before you start working with PowerShell you must need to install 2 components that are Microsoft Online Services Sign-In Assistant for IT Professionals RTW & Windows Azure Active Directory Module for Windows Power Shell.
You can use the Power shell command “ Get-MsolUser ”. Which will list the entire user with an is licensed attribute that indicates whether the user is assigned a Microsoft license or not.
No, a single user can be assigned with multiple licenses. It will depend on the services that a user needs to access while working with the account.