Search code examples
azure-ad-b2cidentity-experience-framework

How to make a Custom Login Flow reset password on Force Password Change


I have created a custom signin flow using the starter pack (with only changes for my ad tenant). I create a new user in Ad, with a temporary password that the user is forced to change on first signin.

When the user signs in for the first time, an error is displayed that the username/password is invalid, rather than going to a password reset page.

What changes do I need to make to the Custom signin flow so it presents a password reset page?


Solution

  • MS have provided a sample that describes how to enact the force password reset. See Here.

    This only works if you create the users programmatically. One point to note is you should make sure you set passwordProfile.ForceChangePasswordNextLogin to false when creating users.