Change Azure B2C user password using Graph API with Admin token only

Kofi Nimoh 21 Reputation points

I understand that this method can only be used with the token acquired by the user:

Content-type: application/json

    "currentPassword": "xWwvJ]6NMw+bWH-d",
    "newPassword": "0eM85N54wFxWwvJ]"

Is there a similar method (supplying current and new password) that can be used with the admin token, or can a custom policy be set up in some manner that would allow something similar to be invoked in graph Api with the admin token?

We have a solution whereby user accounts are maintained via a queue. So, instructions to change claims, roles passwords etc. all end up on a queue where they are picked up and dealt with by a queue-triggered Azure function. So, it just so happens that when a user does "Change Password" as it were, the instruction will end up as a message on a queue, and the function (using an admin account) will do the changing of the password. Hence, we need this function to be available to the admin account.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,367 questions
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,759 questions
0 comments No comments
{count} votes

Accepted answer
  1. 2022-06-05T03:54:41.637+00:00

    Hello @Kofi Nimoh , admins do not need the current user password to reset it, but since the credentials are already being shared, you might want to use the ROPC flow to signin as each user to later call the /me/changePassword endpoint.

    Let us know if this answer was helpful to you or if you need additional assistance. If it was helpful, please remember to accept it so that others in the community with similar questions can more easily find a solution.

    0 comments No comments

0 additional answers

Sort by: Most helpful