Issue:
Article:
Can you provide more information here in the descriptoin of the issue? For instance, what Microsoft Graph request call are you making in postman? and what is the response you get. And why do you expect a SPO licensing error...
I am also facing same issue. I have an user and I am trying to update the following details.
"aboutMe":"BEST DEVELOPER TEST",
"birthday":"1995-01-01T00:00:00Z",
"hireDate":"2019-01-01T00:00:00Z",
"interests":["dancing","singing"],
"mySite":"https://www.mysite.com",
"pastProjects":["API", "Greenhouse"],
"responsibilities":["research", "development"],
"schools":["KV", "MountCarmel"],
"skills":["Quick Learning", "Dedicated"]
If I use any of the above fields is PATCH user by its ID, I get the below error:
{
"error": {
"code": "BadRequest",
"message": "Tenant does not have a SPO license.",
"innerError": {
"request-id": "5e168552-7757-4843-b5db-fc8e10cfb458",
"date": "2019-10-03T10:30:03"
}
}
}
Not sure what is causing this. Can anyone please help. I am also trying from postman.
Which auth flow do you use and what's the exact API path?
I am getting this same issue..
My scenario is that I have an active directory application and I invite a user into my directory as a guest. They create a Microsoft account, login (via adal), and accept consent for the application to their account. I also get the issue if I create a normal user in my active directory (ie. a 'work' account).
Our application then tries to access graph api to create a folder for storing files in their drive account by posting to https://graph.microsoft.com/v1.0/me/drive/root/children
This works fine for users coming in that have office365 accounts but with a personal account or a work account in a directory that does not have office365 we get 400 status with this body returned:
{
"error": {
"code": "BadRequest",
"message": "Tenant does not have a SPO license.",
"innerError": {
"request-id": "xxxxx",
"date": "2020-02-11T02:52:32"
}
}
}
I thought this api would store their files in the users personal one drive account for when they have no sharepoint license? Is that not possible?
So first of all, what I have noticed is that some auth flows require SPO (SharePoint Online) license and some don't. /me/drive always requires that the user has an O365 license or SPO license. Based on my empirical experience with the API the error messages don't seem distinguish between the license types and you just have to know which one is needed. Note that /me always points to the accounts own resources. If you wish to access something that's shared then you'll need something else in place of /me.
Secondly, if possible you should probably migrate from ADAL to MSAL.
Disclaimer: I don't work for Microsoft. I'm just playing around with Graph API for fun.
It's sad and inexplicable how Microsoft Azure documentation is so terrible...
Some user properties listed https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0 require sharepoint / 365; others do not. It's unclear which ones trigger this message. If you call https://graph.microsoft.com/v1.0/users/?$select=country,displayName,givenName,surname,jobTitle,department,userPrincipalName,id,state,userType you'll get a response, but throw in another property - school and it triggers the SPO licence message. Just a column describing which properties are included by what would be nice.