Reputation: 31
I am trying to change my password of Azure account from Microsoft Graph Explorer by using this query:
POST https://graph.microsoft.com/v1.0/me/changePassword
{
"currentPassword": "XXX",
"newPassword": "XXX"
}
I got the below error while executing that query:
{ "error": { "code": "Authorization_RequestDenied", "message": "Access to change password operation is denied.", "innerError": { "date": "2022-07-10T05:59:39", "request-id": "1ecc339e-62f4-4703-9e92-181f894b9790", "client-request-id": "b353d155-13c2-0809-4d83-efb8ae999742" } }
Do I need permission to change my own password? What's the resolution?
Upvotes: 0
Views: 195
Reputation: 16201
I tried to reproduce the same in my environment and got the same error as below:
POST https://graph.microsoft.com/v1.0/me/changePassword
Body
{
"currentPassword": "XXXX",
"newPassword": "XXXX"
}
Please note that, you need Directory.AccessAsUser.All
permission consented like below:
After consenting, I am able to change my password successfully like below:
Reference:
user: changePassword - Microsoft Graph v1.0 | Microsoft Docs
Upvotes: 1