Azure AD B2C Sign in user flow doesn't call API connector

Jakub Pernica 220 Reputation points
2023-12-21T15:32:12.8466667+00:00

I have a user flow in my Azure AD B2C for sign in. I also specified an API connector which is called before including claims:

User's image

Everything works correctly when I sign in, it calls my API connector, include the custom claims. However, one problem appears when I don't sign in normally, but instead I click "Forgot password" option on the Sign In page, verify my email address, create new password and then it signs me in. But before signing, this time it doesn't call my API connector, so it doesn't include the custom claims I need. Is this behavior caused by some misconfiguration or bug of this "preview" feature?

Thanks

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. Shweta Mathur 30,296 Reputation points Microsoft Employee Moderator
    2023-12-22T07:04:03.1333333+00:00

    Hi @Jakub Pernica ,

    When a user resets their password, Azure AD B2C uses a different user flow than the one used for sign-in. Therefore, if you have configured an API connector to be called before including claims in your sign-in user flow, it will not be called during the password reset user flow. This is because the password reset process is a separate flow from the sign-in flow.

    To include custom claims during the password reset process, you can use a custom policy instead of a user flow. With a custom policy, you can define the user journey and include API connectors at any step in the journey, including during password reset.

    Reference: https://learn.microsoft.com/en-us/azure/active-directory-b2c/add-api-connector?pivots=b2c-user-flow

    Hope this will help.

    Thanks,

    Shweta


    Please remember to "Accept Answer" if answer helped you.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.