Azure AD B2C用户重置密码的方式?

Zhang, Jiawang/张 家旺 1 Reputation point

Azure AD B2C用户有几种方式可以重置密码?


Graph API可以重置吗?


Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,156 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,464 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AmanpreetSingh-MSFT 56,096 Reputation points

    Hi @Zhang, Jiawang/张 家旺 • Thank you for reaching out.

    I understood that you want to know how can we reset passwords in Azure AD B2C apart from user flow or custom policy.

    You can use the Graph API method to reset the password but it can only be done by using the standard Azure AD Functionality of the B2C tenant. This means, if you register an application in the B2C tenant using the first 2 options, you can use Graph API with Directory.AccessAsUser.All permission but these applications don't support user flows. So you will have to use the endpoint to acquire the access token for the password reset calls and not the endpoint.

    If you select the third option during app registration, you will not be able to use the application for password reset as Graph API permission Directory.AccessAsUser.All won't be available. In this case, you will have to use the password reset using user flow or custom policy.


    After you acquire the token, you need to use the token as the bearer token in the authorization header and make the below graph call to reset the password.

    Call: POST{id | userPrincipalName}/authentication/passwordMethods/{id}/resetPassword  
    "newPassword": "newPasswordvalue",  

    If you don't know the passwordMethods ID, you can use below GET call to find that:

    GET{id | userPrincipalName}/authentication/passwordMethods/  

    To test these calls, you can also use Graph Explorer


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.