Azure AD B2C - Administrator changes the password, user not able to login to application

Sakthi 121 Reputation points

We are using custom policies to login to our application. Now, we have a scenario where the admin reset passwords for the users using the Azure ADB2C blade.

But, the user is not able to login to the application when trying to use the temporary password and they get "The password has expired" error message.

I have seen this answer already -

But it was mentioned in 2020, so would like to know below details related to same:

  1. I understand that forceChangePasswordNextSignIn will be set to true, when admin resets the password. Can we read this forceChangePasswordNextSignIn attribute using custom policy within the userJourney?
  2. We get an exception in the login-NonInteractive validation technical profile, is there anyway to track and handle the exception within the custom policy.

We get an exception as shown below:

     "Exception": {
        "Kind": "Handled",
        "HResult": "80131500",
        "Message": "The password has expired.",
        "Data": {
          "IsPolicySpecificError": false

If we can read this exception in custom policy userjourney step, based on the message, we can re-direct the user to change password flow.

Can you please suggest/guide on this. Thanks

Azure Active Directory External Identities
{count} votes