0
votes

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.

1
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. Since filter is not supported as of now you need to write the code on your end and find it.Shiva Keshav Varma
Please read Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers? - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions.halfer
Did it work for you?Shiva Keshav Varma
Thanks @Shiva-MSFTIdentity for your answer, I tried it and it worked. What I did was I checked if 'SHAREPOINT' is a subset of the servicePlanName field, and it worked perfectly for my use case.Ashen Gunawardena
@halfer Thanks for your suggestion. This is my first question on StackOverFlow, and I will surely follow your suggestion the next time.Ashen Gunawardena

1 Answers

0
votes

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.