Unable to login with Recommended sign in user flow

Maxim Tihobrazov 106 Reputation points

I am using Azure AD B2C and create there a new sign in user flow

If I choose "Standard" flow, then try to test it with "Run user flow" in portal, it works fine (I enter UPN as login here),

but with choosing "Recommended" I can not login with the error "The username you have provided is not valid. It must begin with an alphabetical character or number, and can only contain alphanumeric characters and the following symbols: _ -", so full UPN with the form user@ssss .com can not be used, trying to enter login without @ssss .com ends up with the error "We can't seem to find your account"

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
18,693 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Jas Suri 91 Reputation points Microsoft Employee

    You can use Custom Policy Username sample here that will support both Username and Email in a Username style policy (like User Flow).

    The Custom Policy allows you to adjust the regular expression used to validate the "username" field, such that it can support the '@' symbol, or any other characters you expect.

    In User Flow, it has been restricted to explicitly Email=email, and Username=username (ie not an email).

    1 person found this answer helpful.
    0 comments No comments

  2. JamesTran-MSFT 36,051 Reputation points Microsoft Employee

    @Maxim Tihobrazov and @Nick Rubino
    Thank you both for the details and screenshots, I reproduced your issue and will post my findings below.

    Working with my team, we found that your "Local Account" configuration might be set to Username, rather than Email.

    Next Steps:
    In order to resolve this issue we need to change your configuration from username to email.

    1- Navigate to where your AzureAD B2C overview page -> Select Identity Providers -> Select Local Account -> Change from Username to Email

    2- Navigate to your User flows, specifically your "recommended sign-in" flow -> Select Identity Providers -> Select the box next to Local Account and save.

    3- Re-run the flow and sign in using your email address or UPN.

    If you're still experiencing issues with this, please let me know.
    Thank you for your time and patience throughout this issue.