🎉 Our Office 365 Reporting Tool is now available in Azure Marketplace 🚀
This website uses cookies to improve your experience. We'll assume you're ok with this. Know more.

How to Export Microsoft 365 User License Report

Are you concerned about Microsoft 365 license management, especially in the case of former employees who may still have active licenses? This situation can potentially lead to increased Microsoft 365 licensing costs and data security risks. So, take control today! Learn how to export user license report in Microsoft 365 and effectively handle unused licenses.

Native Solution

Microsoft 365 Permission Required

High

Global Admin or User Admin or License Admin.

Option 1 Using Microsoft 365 Admin Center

  • Login to the Microsoft 365 admin center.
  • Navigate to Users» Active Users. From the filter icon at the top, select Licensed users.
Using Microsoft 365 Admin Center
  • You can get a list of all licensed users in Office 365 along with their licenses as shown above.

Option 2 Using Windows PowerShell

  • Connect to Microsoft Graph PowerShell using the below cmdlet.
  • Windows PowerShell Windows PowerShell
     Connect-Graph -Scopes User.Read.All, Organization.Read.All
  • Run the following cmdlet in PowerShell to get Microsoft 365 licenses assigned to users.
  • Windows PowerShell Windows PowerShell
     Get-MgUser -Filter 'assignedLicenses/$count ne 0' -ConsistencyLevel eventual -CountVariable licensedUserCount -All -Select DisplayName,AssignedLicenses | Format-Table -Property UserPrincipalName,DisplayName,AssignedLicenses
Using Windows PowerShell
  • The above cmdlet displays all licensed users’ display name and licenses assigned to them.

Option 3 Using PowerShell Script

  • However, it can be challenging to pinpoint the exact subscription names using the PowerShell cmdlet mentioned above. As a solution, we've developed a PowerShell script that displays the friendly names of Microsoft 365 licenses assigned to users.
  • Download and run the following script in the Administrator PowerShell.
Using PowerShell Script
AdminDroid Solution
This report and 150+ more reports are under free editionFREE

AdminDroid Permission Required

Any user with report access delegated by the Super Admin.

StepsUsing AdminDroid

ad
  • Login to the AdminDroid Office 365 reporter.
  • Navigate to the All Licensed Users report under Reports»AzureAD»License Reports.
Using AdminDroid

Get a list of licensed users in Microsoft 365 along with their subscription, services offered, sign-in status, usage location, etc.

license-graph
  • Using the in-built graphical representation, you can get Microsoft 365 users with a specific license type easily with just a few clicks.

Streamline Microsoft 365 user license management!

Don't let unused licenses pile up! Manage Microsoft 365 subscriptions with AdminDroid effectively.

Witness the report in action using the

Important Tips

Audit the unused Microsoft 365 subscriptions and then consider purchasing necessary units in the future to reduce licensing costs.

Remove Microsoft 365 licenses from shared mailboxes, as they don't require licensing until they reach 50 GB of storage.

Track Microsoft 365 license assignment events in your organization and ensure users have access to appropriate services for efficient task performance.

Azure ADFind the Licensed Users to Optimize License Usage in Microsoft 365

Showing 1 of 7

Why is it important to license users in Microsoft 365?

Assigning licenses to users in your Office 365 environment is necessary for the following reasons,

  • Access to Office 365 services: Licensing streamlines the process of assigning various Microsoft 365 services to users based on their roles, job titles, and departments, ensuring appropriate access and functionality for each user.
  • Audit Microsoft 365 user activity: By assigning licenses, admins can easily track user activities in various Office 365 services.
  • Cloud storage and file sharing: Microsoft 365 licenses often come with cloud storage through OneDrive, allowing users to store their files securely in the cloud. Users can access those files from anywhere around the globe with an internet connection.
  • Secured email communications: Licensed users benefit from advanced threat protection features, including anti-phishing, anti-malware, and encryption. These tools prevent spam, malicious attachments, and phishing attempts, ensuring secure email communication and maintaining data integrity.
  • Enhanced productivity: Since Microsoft 365 licenses include services such as Teams, SharePoint, etc., users can collaborate with others, which escalates productivity.

How to assign a Microsoft 365 license to a user?

To assign a Microsoft 365 license to a user, you need to have global admin or license admin permissions in the Microsoft 365 admin center. You can assign Office 365 licenses to users either from the Active users page or the Licenses page of your admin portal.

Active users page from Microsoft 365 admin center

  • Navigate to Users»Active users. Click the desired user.
  • Under the Licenses and apps tab, you can see various licenses available in the Licenses section. Select the required license.
  • Select the necessary apps according to the user’s requirements from the Apps section and click on Save changes.

Licenses page from Microsoft 365 admin center

  • Navigate to Billing»Licenses. Click the desired user under the Subscriptions section.
  • Click on the +Assign Licenses option and select the user. Select the products from the "Turn apps and services on or off" drag-down box and click on Assign.

Run the below cmdlet to assign Microsoft 365 licenses to user accounts with PowerShell.

Set-MgUserLicense -UserId "<UPN>" -RemoveLicenses @("<AccountSkuId1>") -AddLicenses @{}

Using AdminDroid, you can instantly audit users' license changes in your Microsoft 365 environment.

  • Utilize the in-built alert policy template to create an alert on user license changes happening in your organization.
  • Click on “Preview & Deploy” to generate alerts separately for each license change activity.
  • Pro Tip: You can make further changes on severity levels, and labels by navigating to the Alerts tab from the AdminDroid portal.
license-alert

What is group-based licensing in Microsoft Entra ID?

Microsoft 365 license assignment process can be made easier through group-based licensing. With this method, you can assign Office 365 licenses to users who are added to security groups within your organization. This approach is known as inherited license assignment.
Follow the steps below to assign Microsoft 365 licenses by group.

  • Login to the Microsoft 365 Entra admin center.
  • Navigate to the Licenses tab under Billing. Under the Manage section, select All products. Select the license you want to assign and click the +Assign option at the top.
  • Click on the +Add users and groups option and add the desired security group. You can enable only the required plans using the "On" and "Off" settings under the Assignment options. Click on Assign.

When you add a user to the designated security group in Microsoft 365, they will automatically be assigned the license associated with that group.

As group-based licensing is a bulk operation, receiving notifications about specific licenses assigned to a group is essential to assess whether your organization can accommodate these additional units.

Using AdminDroid, you can get alerted on a specific Microsoft 365 license assigned to a group in your organization.

  • Here, you can get entire details about the license-assigned group name, who assigned the license, and modifications in the plans.
group-license-changes

How to manage unused licenses in Microsoft 365?

For effective Microsoft 365 license management, it is important to remove unused licenses. Before managing unused licenses, you must get inactive users with licenses assigned in Microsoft 365.
Follow the steps below to get the Microsoft 365 inactive users report.

  • Microsoft 365 Admin Center To find inactive users in Microsoft 365 admin center, navigate to Reports»Usage» Microsoft 365 apps. You can track users’ activity from the Active users section.
  • Microsoft PowerShell Run the below cmdlet to find a list of inactive users in Microsoft 365 using PowerShell.
Get-MgUser -All -Property 'UserPrincipalName','SignInActivity','Mail','DisplayName' | Select-Object @{N='UserPrincipalName';E={$_.UserPrincipalName}}, @{N='DisplayName';E={$_.DisplayName }}, @{N='LastSignInDate';E={$_.SignInActivity.LastSignInDateTime}}

To remove unused licenses using the Microsoft 365 admin center, follow the steps below.

  • Navigate to Users»Active users and click the desired user.
  • Under the Licenses and apps tab, you can see various licenses assigned in the Licenses section.
  • Uncheck the licenses that you want to remove for the user. You can also remove the licenses of specific applications under the Apps section.

Run the below cmdlet to remove Microsoft 365 licenses from user accounts with PowerShell.

Set-MgUserLicense -UserId "<UPN>" -RemoveLicenses @("<AccountSkuId1>") -AddLicenses @{} 

With AdminDroid, you can easily check the Microsoft 365 inactive users report by their last active time.

  • Here, you can get the last active time and the inactive days based on various services like Exchange, OneDrive, SharePoint, Teams, Yammer, etc. Additionally, you can view the common last inactive time, which selects the most recent from all the services.
  • Using the Advanced Customization feature, you can see the users with most number of inactive days.
  • Pro Tip: Revoke access to specific Office 365 services due to prolonged user inactivity.
inactive-days

How to check users’ licenses in Office 365?

As an admin, it is important to manage Microsoft 365 licenses to ensure users have the right tools for their roles. One key aspect of this is to regularly check users' licenses to make sure they align with your organization's needs.


Follow the below to get a list of all licensed users in Microsoft 365 and revoke unwanted license assignments.

  • Microsoft 365 Admin Center Navigate to Users»Active users. From the filter icon at the top, select Licensed users.
  • Microsoft PowerShell Run the script provided to export Microsoft 365 Users and their Licenses to CSV with PowerShell.

Obtaining the Microsoft 365 user license report via the admin portal is simple for organizations with a smaller number of users. However, if you are an organization with a larger number of users, checking M365 licenses could become more challenging.

How to export a list of licensed users in Office 365?

With AdminDroid, you can periodically export Microsoft 365 user license report to your mailbox in various formats such as HTML, PDF, CSV, XLS, and XLSX.

  • You can directly click on the "Schedule this report now" icon to receive the report in different time frames to your mailbox.
  • Pro Tip: By scheduling with filters, you can get Microsoft 365 users with a specific license type to your mailbox. This approach proves beneficial, as reporting on users with free licenses in Microsoft 365 may not be necessary.
license-schedule

What can an unlicensed user do in Office 365?

Microsoft 365 unlicensed users can access some services and tools but with more restrictions. Here are some restrictions and permissions for unlicensed users in Office 365,

  • Unable to send/receive emails : Without an Exchange Online mailbox, users cannot send emails. If any user attempts to send an email to an unlicensed user, they will receive a non-delivery report stating the message couldn’t be delivered.
  • Access OneDrive files shared with them : Microsoft 365 unlicensed users can access OneDrive files using a link shared with them. However, they cannot use OneDrive for uploading files.
  • Access SharePoint sites & files on Office 365 homepage : Unlicensed users can access SharePoint sites and applications from their Microsoft 365 homepage that have been added as 'Custom tiles' by administrators.

Using AdminDroid, you can track the unlicensed users' activities in your Microsoft 365 environment.

  • Using the easy filters capability, you can view the activities of users without a license.
  • Here, you can get the performed operation, the performed time, along with the user's department and job title. Upon analyzing the users' details, you can decide on assigning a Microsoft license to them.
unlicensed-users-activities

How to reduce Microsoft 365 licensing costs?

An improper Microsoft 365 license management can significantly increase the overall expenditure of your organization. Therefore, it is crucial to optimize Microsoft 365 license usage by adhering to some best practices.
Follow the steps below to reduce Microsoft 365 licensing costs,

  • Track Microsoft 365 subscription usage regularly to ensure they are being efficiently utilized.
  • Give preference to annual billing over monthly billing due to its cost-saving advantages.
  • Before assigning licenses to a group, check the guest user count in the group. Usually, guest users don’t need a license from your tenant.

AdminDroid Microsoft 365 License ReportingYour toolkit for license optimization in Microsoft 365!

The AdminDroid Microsoft 365 license management tool provides complete information about the licenses within your organization. Moreover, it allows you to audit subscriptions that are approaching their expiration, expired Microsoft 365 subscriptions and licenses assigned to sign-in disabled users.

Maximizing your insights with AdminDroid's unmatched features for checking the licensed users in your M365 organization

By consistently checking the All Licensed Users report, you gain valuable insights that enable you to make informed decisions regarding resource procurement. With this information, it is easier to allocate resources that align precisely with your organization's needs.

An Overview

Customize the Alerts on Users’ License Changes

Receive the alert report in your mailbox, categorized as Severe, High, Medium, Low, and Info so that you can make precise decisions based on these levels.

Microsoft 365 Suspended Subscriptions

Reactivate the suspended Microsoft 365 subscriptions of users within 90 days to avoid data loss.

Hierarchical View of Users’ Inactive Days

Using various reporting capabilities, get the M365 users who have not signed in for a long period of time. This simplifies the process of revoking licenses for those who're inactive for an extended period.

Check Microsoft 365 Unlicensed Users

Assign licenses to Microsoft 365 unlicensed users who may need access to specific services for efficient task performance.

Regain Licenses of Disabled Users

Find disabled users still licensed in Microsoft 365 and allocate them to active users to avoid unwanted license usage.

Renew Expired Microsoft 365 Subscriptions

Track the subscription expired users, and make purchasing choices as needed.

AdminDroid simplifies Microsoft 365 license assignment by offering enormous reports and features. With the diverse range of Microsoft 365 licenses available, it is crucial to procure and assign precise licenses to users, thus optimizing license usage.

Kickstart Your Journey with AdminDroid

Your Microsoft 365 Companion with Enormous Reporting Capabilities!

Common Errors and Resolution Steps for getting user license report in Microsoft 365

The following are the possible errors and troubleshooting hints while dealing with licensed users in Office 365.

Error: Get-MgUser: Calling principal does not have required MSGraph permissions AuditLog.Read.All

This error occurs when the MS Graph module does not have permission to read the audit log to display the last active time of users.

Troubleshooting hint :Connect to the MS Graph PowerShell using the below cmdlet to give permission to read the audit log.

Connect-MgGraph –Scopes Directory.Read.All,AuditLog.Read.All

Error: Set-MgUserLicense: User license is inherited from a group membership and it cannot be removed directly from the user.

This happens when you try to remove a license from a Microsoft 365 user that was inherited from a group.

Troubleshooting hint :Run the below PowerShell cmdlets to remove the user from the security group from which the license was inherited.

// Connect to the MS Graph PowerShell to give permission to edit group membership details.
Connect-MgGraph -Scopes GroupMember.ReadWrite.All, Group.ReadWrite.All, Directory.ReadWrite.All
// Run the below cmdlet to remove a user from the group.
Remove-MgGroupMemberByRef -DirectoryObjectId "<User's Object Id>" -GroupId "<Group's Object Id>"

Error: Conflicting service plans.

This error occurs when you allocate a license to a group, and the service plans within that license can’t overlap with the plans already assigned to a user through a different license directly.

Troubleshooting hint :Disable any one of the plans from the license assigned to the user.

Error: License assignments failed.

This error occurs when you assign a license for users from the Azure portal whose usage location is not defined.

Troubleshooting hint :Set the usage location by selecting the desired user from the All Users section in the Microsoft Entra admin center (formerly Azure Active Directory).

Error: Your message to couldn’t be delivered.

This error occurs when you send an email to a user without an Exchange Online license in your organization.

Troubleshooting hint :Assign an Exchange Online license for the user by navigating to the Users tab from Microsoft 365 admin center.