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?
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!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.