I'm using the REST Azure AD API to disable a certain application of a user. The license already in effect is Office 365 A1 for faculty and the product I want to disable is Sway (this is just a test).
According to documentation, all I have to do is to post to /users/XXX/assignLicense
containing following JSON content:
{
"addLicenses":[{
"disabledPlans": ["a23b959c-7ce8-4e57-9140-b90eb88a9e97"],
"skuId":"94763226-9b3c-4e75-a931-5c89701abe66"
}]
}
The GUID for Sway was learned from Product names and service plan identifiers for licensing. The SkuId is the same used when the user was created and licensed.
The user in question was created by using a REST API call so I'm pretty sure the part of access token retrieval and stuff is correct.
However, I always receive a HTTP error 400 (Bad Request) with no detail about what is wrong.
Any ideas?