I have created Users in Azure AD and with the help of Microsoft graph api trying to change the password of users but getting error message as admin rights required. Help is appreciated
{
"passwordProfile": {
"forceChangePasswordNextSignIn": false,
"password": "newPassword"
}
}
Try doing a patch and changed the attribute. This also worked for me in the past.
I'm not sure which api you are using , Azure AD Graph API or Microsoft Graph api . But no mater which api , the change password operation is used for the signed-in user to change their own password :
microsoft graph api :
POST https://graph.microsoft.com/v1.0/me/changePassword
Content-Type: application/json
{
"currentPassword": "Test1234!",
"newPassword": "Test5678!"
}
Azure AD Graph api :
POST https://graph.windows.net/me/changePassword?api-version=1.6
Content-Type: application/json
{
"currentPassword": "138122cC@",
"newPassword": "138122c@"
}
Please refer to document : https://msdn.microsoft.com/Library/Azure/Ad/Graph/api/functions-and-actions#changePassword
Note: This action can only be called on the signed-in user. In addition to addressing the operation by using the me alias as shown below, you can use /users//changePassword or /users/userPrincipalName/changePassword, but if you use these addressing modes, the target user must be the signed-in user.
If target user isn't the signed-in user , it will throw error :Access to change password operation is denied.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With