Graph API for Reset the Password for user is not working as expected

Khedkar, Vidisha 135 Reputation points
2025-08-22T11:24:36.5433333+00:00

Hi Team,

We are attempting to use the Graph API endpoint below, but it’s not behaving as expected.

We sent a PATCH request and received a 200 OK response. However, when the user tries to log in using the updated password, they are able to sign in and are prompted to reset their password.

The issue arises when the user enters their current password and a new one during the reset process — the system consistently returns an error stating that the current password is incorrect.

Thanks,

vidisha

Microsoft Security | Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. Carolyne-3676 881 Reputation points
    2025-08-30T20:54:52.3966667+00:00

    Hello Vidisha!
    Thanks for reaching out.
    I have reproduced this using this bit of the documentation and was able to successfully send the PATCH request and logged in using the temporary password. I then reset my password and was able to use the new password to log in. The correct response should be a 204
    https://learn.microsoft.com/en-us/graph/api/user-update?view=graph-rest-1.0&tabs=http#example-3-update-the-passwordprofile-of-a-user-and-reset-their-password User's image
    When you use the Graph API to reset a user's password (PATCH /users/{id} with passwordProfile), the new password is set, but by default, forceChangePasswordNextSignIn is often set to true.

    When the user signs in, they're prompted to change their password. However, the "current password" the system expects is the one set by the API, not the user's previous password.

    If the user enters their old password (before the API reset), it will fail. They must enter the password set by the API as the "current password" in the change password prompt.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.