user3394
user3394

Reputation: 31

Failed to change azure account password from MS Graph Explorer

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

Answers (1)

Rukmini
Rukmini

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"
}

![enter image description here](https://i.imgur.com/voSltoc.png)

Please note that, you need Directory.AccessAsUser.All permission consented like below:

enter image description here

After consenting, I am able to change my password successfully like below:

enter image description here

Reference:

user: changePassword - Microsoft Graph v1.0 | Microsoft Docs

Upvotes: 1

Related Questions