How to find users with specific Office365 license

Ever wondered how can you find the users that have some untypical Office 365 licenses? Last week i had to find all the users that have the Dynamics 365 for Talent license (part of the Dynamics 365 portfolio of licenses).

The Users or the Active Users search on the portal was not a huge help so I had to use powershell to get the desired info.

First you will have to connect to your Office365 via powershell:

Connect-MsolService

Enter your username and password. After you connect, you can see all the licenses for your tenant using this cmdlet:

Get-MsolAccountSku

If you are searching for a specific license (for instance the Dynamic 365 for Talent) you can use the following cmdlet:

Get-MsolUser -all | Where-Object {($_.licenses).AccountSkuId -match "HCM_Trial"}

It will show all the users that have this license assigned.

This entry was posted in Office 365 and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *