Reputation: 17
I am trying to update azure active directory members passwords. I have tried with both Microsoft graph api and azure ad graph api. However I am not able to update members password. I have tried with all the permission. Please refer below error:
{
"odata.error": {
"code": "Authorization_RequestDenied",
"message": {
"lang": "en",
"value": "Insufficient privileges to complete the operation."
}
}
}
Could you please help me to find out the solution?
Upvotes: 0
Views: 91
Reputation: 9411
If you want to have enough privileges to reset users password, you need to assign Company Administrators
Role to your Service principal. You can refer to this document to do that.
Connect-AzureAD
$role = Get-AzureADDirectoryRole | Where-Object {$_.displayName -eq 'Company Administrator'}
Add-AzureADDirectoryRoleMember -ObjectId $role.ObjectId -RefObjectId $yoursp.ObjectId
Hope this helps!
Upvotes: 1