Unable to login the user created by MS Graph

Carol Lai 521 Reputation points
2021-05-07T06:52:39.533+00:00

I followed the following example to create a user "Casey Jensen" in my AAD B2C.
https://learn.microsoft.com/en-us/azure/active-directory-b2c/microsoft-graph-operations#code-sample-how-to-programmatically-manage-user-accounts
I saved the password so I can test the signin procedure. I saw "Casey Jensen" got created in my AAD B2C as the following.

94691-image.png

When I ran the signupsignin1 user flow, 94694-userflow.png

and signin as Casey Jensen
94701-signin1.png

It said the password has expired.
94711-signin2.png

How to fix this problem when creating a user?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,836 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,678 questions
0 comments No comments
{count} votes

Accepted answer
  1. AmanpreetSingh-MSFT 56,336 Reputation points
    2021-05-07T07:14:26.08+00:00

    Hi @Carol Lai · Thank you for reaching out.

    I am suspecting the account that you have created using Graph API is created with a temporary password, which is marked as expired and must be changed at first sign-in.

    To allow force password change via B2C User Flow, you need to:

    Open B2C_1_signupsignin1 User Flow > Properties > Under Password Configuration section > Select the checkbox for Forced password reset (Preview)

    Once this is done, try to signin using same account and you should be presented with below screen to set a permanent password for the user account.
    94667-image.png

    Read more: https://learn.microsoft.com/en-us/azure/active-directory-b2c/force-password-reset?pivots=b2c-user-flow

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

    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