How to Check Microsoft 365 License SKU Details Using PowerShell


Managing licenses effectively is essential for administrators, especially in large organizations. Knowing which SKUs (Stock Keeping Units) are available and how they’re being used can help in optimizing costs and ensuring users have the correct licenses assigned. In this post, we’ll cover how to check Microsoft 365 license SKU details using PowerShell.


Use Cases

1. License Auditing and Compliance:
By checking the SKU details, you can ensure that users are assigned the appropriate licenses. This is particularly useful during internal audits to confirm compliance with licensing agreements.

2. Cost Optimization:
PowerShell enables administrators to quickly identify users who might be over-licensed. For example, users assigned to Business Premium licenses might only need Business Basic, leading to cost savings when reassigned appropriately.

3. License Allocation for Large Teams:
When managing thousands of users, PowerShell is a fast and efficient way to track the consumption of licenses across the organization. This ensures that no licenses go unused and users have the necessary access to Microsoft 365 services.


Checking Microsoft 365 License SKU Details via PowerShell

Step 1: Connect to Microsoft 365 via PowerShell

Before diving into the methods, if you need assistance with installing and connecting to Exchange Online via PowerShell, follow our guide here: How to Install and Connect Exchange Online Using PowerShell.

Step 2: Retrieve Available License SKUs

Once connected, use PowerShell to retrieve all the available license SKUs within your tenant. The cmdlet Get-MsolAccountSku (for MSOnline) or Get-AzureADSubscribedSku (for Azure AD) will return a list of licenses.

Example Command (MSOnline module):
Get-MsolAccountSku
Example Output:

Example Command (AzureAD module):
Get-AzureADSubscribedSku  | FL objectId, SkuPartNumber, ConsumedUnits

Both commands provide an overview of the license names, consumed units, and the specific SKU ID for each license type.

Example Output:

Here, AccountSkuId is the unique identifier for each license type, and ConsumedUnits shows how many licenses are currently assigned to users. This information is essential when determining whether to acquire additional licenses or reassign existing ones.

Step 3: Check License Details for a Specific User

To find out which licenses a specific user is assigned, use the following PowerShell command.

For MSOnline Module:
Get-MsolUser -UserPrincipalName user@domain.com | Select-Object DisplayName, Licenses
Example output:

For AzureAD Module:
Get-AzureADUser -ObjectId user@domain.com | Select-Object DisplayName, AssignedLicenses

This command will return the DisplayName and the license SKU IDs assigned to the specified user. You can use this information to verify if the user is correctly licensed or needs an upgrade or downgrade.

Example Output:
DisplayName         Licenses
------------        -------------
John Doe            {tenant:ENTERPRISEPACK, tenant:MICROSOFT_BUSINESS_BASIC}

In this example, the user John Doe has both Enterprise Pack and Business Basic licenses, allowing you to determine if they need both or just one.


Conclusion

Using PowerShell to check your Microsoft 365 License SKU details allows you to efficiently manage your licenses, audit usage, and optimize costs, particularly in large organizations. By leveraging PowerShell, administrators gain flexibility and control over how licenses are tracked and assigned, ensuring compliance and cost-effectiveness.