Forum Discussion
"Insufficient privileges to complete the operation" while using Graph API
Hello, everyone!
I'm trying to use the Microsoft Graph API with App Authentication to assign an Product License to a user.
My App has the App permissions "LicenseAssignment.ReadWrite.All", "Directory.ReadWrite.All" and "User.ReadWrite.All".
https://graph.microsoft.com/v1.0/users/$upn/assignLicense
{
"error": {
"code": "Authorization_RequestDenied",
"message": "Insufficient privileges to complete the operation.",
"innerError": {
"date": "2025-03-19T08:17:35",
"request-id": "c368027b-6462-472f-a726-a9b04b26e11e",
"client-request-id": "c368027b-6462-472f-a726-a9b04b26e11e"
}
}
}
My request body looks as follows:
{
"addLicenses": [
{
"disabledPlans": [],
"skuId": "..."
}
],
"removeLicenses": []
}
For assigning a license, I got teams(community) list, and members list.
I hope for your selfless help.
1 Reply
Have you granted admin consent to the above permissions? Check your token against jwt.ms or similar tools, make sure the corresponding roles are reflected therein.