Check Available Office 365 Licenses With PowerShell

In this blog post, I will show you how to check the available licenses you have in Office 365, how many exist and how many are being used by users.

I know that it is possible to check your licenses from Office 365 portal however sometimes you would like to check it using a script or Azure automation.

Azure AD PowerShell Module

In this demo, I will use the Azure AD PowerShell module which only runs on Windows machines since it needs PowerShell 5.1.


To check how many licenses and which products you have licenses to, log in to Azure AD using PowerShell with the following command:


To check the licenses run the cmdlet below.

Get-AzureADSubscribedSku | Select-Object -Property ObjectId, SkuPartNumber, ConsumedUnits -ExpandProperty PrepaidUnits | ft

Success! You're on the list.