Force Password Reset on initial login custom policy not working

Viewed 888

I am trying to use Azure AD B2C: Force password reset first logon to implement the Password reset on initial login. I am using a username to sign in to the application and NOT Email address. When I sign-in using my username, I am not getting redirected to the password reset page and the custom attribute is not cleared.

I am using Graph API to set the custom attribute Extenstion_000000000000000000000000000000000_ForcePasswordResetOnInitialLogin with user creation. Can you please direct me where I am doing this wrong?

I would like the user to sign in for the first time and get redirected to reset the password and clear the custom attribute.

Note: I am using Sign in using Username and there is no user signup. All users are created by Graph API.

2 Answers

Force Password change works only with Sign-in policy. It does not work with SignInSignUp policy. Have a look at the discussion here

This feature is planned for implementation.

I tested this sample you shared and it works fine for me.

So if you are not getting re-directed to the password reset page, the reason should be that you haven't configured the UserJourney "SignUpOrSignIn" correctly.

Please add the code of step 7 and step 8 (line 188 to 233) into your UserJourney "SignUpOrSignIn" in your TrustFrameworkExtensions.xml or TrustFrameworkBase.xml file. And note that if you add the code into TrustFrameworkBase.xml, you should also add the TechnicalProfile "AAD-UserRemoveMustResetPasswordUsingObjectId" to the corresponding location of the TrustFrameworkBase.xml file.

Related