Ashen Gunawardena
Ashen Gunawardena

Reputation: 45

Microsoft Graph API - Check if user has a SharePoint license

I want to check whether a Microsoft user has a SharePoint online license given to him through the Microsoft Graph API.

I have found an API endpoint from where I can get all the licenses given to a user: List licenseDetails, but I want to get only the SharePoint license information.

Upvotes: 1

Views: 1098

Answers (1)

Shiva Keshav Varma
Shiva Keshav Varma

Reputation: 3585

You can get the Sharepoint license details by using this call

https://graph.microsoft.com/v1.0/users/{userid}/licensedetails 

and you need to search for servicePlanName property having value 'SHAREPOINTENTERPRISE' inside servicePlan array for Sharepoint Online. Since filter is not supported as of now you need to write the code on your end and find it.

Upvotes: 2

Related Questions