Azure ADB2C user (Created through MS Graph API) should Reset passward on his first login

Code Bit 86 Reputation points
2021-03-26T00:15:36.487+00:00

my scenario is that i have created AD B2C user (Local and social Account) using graph API setting an initial "password" and it is login successfully using that password, what i want now is that at his first login he should be asked to reset his password.

what should i do to make it functional(i don't need to reset user password from azure portal)
user himself should reset it on his first longin.

any help will be appreciated.

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Answer accepted by question author
  1. AmanpreetSingh-MSFT 56,936 Reputation points Moderator
    2021-03-26T12:03:58.037+00:00

    Hi @Code Bit · Thank you for reaching out.

    Here is a sample: https://github.com/azure-ad-b2c/samples/tree/master/policies/force-password-reset-first-logon that you can refer to.

    This sample demonstrates how to force user to reset password on the first logon. It is based on an extension attribute. When you create a B2C account via Graph API, you set this property to true. On run time, when user sign-in, Azure AD B2C checks the value of this extension attribute. If set to true, B2C asks the user to reset the password and removes this attributes from the user account.

    -----------------------------------------------------------------------------------------------------------

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


0 additional answers

Sort by: Most helpful

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.