Microsoft Graph API - Get a list of all users with a specific license SKU

다언 이 6 Reputation points

With Microsoft Graph API,

I want to get a list of users with a certain license such as O365 E3, Business Standard etc.

Get a user list

Get a list of all allocated licenses of one user

What I want is, all the users' list hoding a certain license.

If it does not exist, I have to loop so many times which is low performance.

Please help. Thank you.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,779 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Sreeju Nair 11,621 Reputation points

    You can use graph api to list the users and add filter parameter to get the users who are assigned with a particular license. This use case is documented in the following URL.

    GET$select=id,mail,assignedLicenses&$filter=assignedLicenses/any(u:u/skuId eq cbdc14ab-d96c-4c30-b9f4-6ada7cdc1d46)  
    2 people found this answer helpful.