Get a Report Of All Licensed Users In Office 365

One of the things you need to do once you migrate your on-premise exchange server to Office 365 is to keep an eye on the licenses assigned to accounts. Even though you can see the licenses assigned to individual accounts from the Office 365 admin panel, in this post I will show you how to get a generate a quick report of all your licensed users using PowerShell.

The first thing you need to do is to connect to your Office 365 tenant using PowerShell. To do that, open PowerShell on your computer and type this command:


If this is the first time using PowerShell to connect to your Office 365 tenant, then you need to run this command as “Administrator” in PowerShell:

Install-Module -Name AzureAD

To view, a quick list of all your licensed users run this command:

Get-MsolUser -All | where {$_.isLicensed -eq $true}

And to export the list to a CSV file type this command:

 Get-MsolUser -All | where {$_.isLicensed -eq $true} | Export-CSV "localpath"

Change “localpath” to a path on your computer where you want to save the CSV file.


And that’s it. simple right?