Unable to login the user created by MS Graph

Carol Lai 511 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 Users API
Microsoft Graph Users API
A Microsoft API that allows you to build compelling app experiences based on users, their relationships with other users and groups, and the resources they access for example their mails, calendars, files, administrative roles, group memberships.
551 questions
Azure Active Directory External Identities
Microsoft Graph Security API
Microsoft Graph Security API
A Microsoft API that provides a unified interface to connect security solutions from multiple Microsoft and third-party providers.
102 questions
No comments
{count} votes

Accepted answer
  1. AmanpreetSingh-MSFT 55,226 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.

    No comments

0 additional answers

Sort by: Most helpful