Managing external identities to enable secure access for partners, customers, and other non-employees
Username sign-in in Microsoft Entra External ID requires two separate configurations to be in place and aligned with the user flow being used:
- Enable username as a sign-in identifier at the tenant level
This is done in the Sign-in identifiers policy. From the screenshot, Username is already enabled with the default regex, which is correct. - Use a user flow that is configured for username/alias
The page in the screenshot that enforces an email format is the standard Email with password local account experience. That experience always validates the identifier as an email address. To allow username input instead of email in the user flow:- In the external tenant, go to Entra ID → External Identities → User flows.
- Open the specific user flow being tested.
- Under Settings, select User attributes and ensure the Username attribute is added to the flow.
- Optionally, under Page layout, change the label of the Username field (for example, to Alias or User ID).
- Confirm behavior when testing
Use Run user flow to test. If signing in with email,preferred_usernamewill contain the email; if signing in with username,preferred_usernamewill contain the username.
If the user flow still shows an email-only field, verify that the correct (updated) user flow is the one being invoked by the application and that it has the Username attribute configured as above.
References:
- Sign in with an alias or username
- Enable username in sign-in identifier policy
- Create and update users with username
- Sign up with an alias or username (preview)
- Test signing in with the alias or username
- Identity providers for external tenants
- Tutorial: Add sign-in and sign-out in iOS/macOS app by using native authentication
- Quickstart: Sign in users in a single-page app by using native authentication JavaScript SDK