External ID mixed user flow: returning federated users hit the local email/password screen on re-authentication instead of their IdP

Craig Rowe 0 Reputation points
2026-07-14T14:42:16.7666667+00:00

TLDR: Returning federated users to an external entra sign in are presented with a pre-filled screen of their CIAM <guid>@<tenant>.onmicrosoft.com account - which they cannot use as they are federated and have to back out and re-choose their workforce tenant idp.

Setup (external / CIAM tenant):

  • A single sign-up / sign-in user flow, used by several SPA and Web SWA apps.
  • The flow offers both: (a) local email + password accounts for a subset of consumer users, and (b) a federated Microsoft Entra ID (custom OIDC) identity provider for users from a separate workforce Entra tenant.
  • Workforce users are created just-in-time through the user flow (self-service sign-in); a sign-up validation (custom authentication extension) restricts which email domains may register. They are not pre-created via Graph. Their objects have signInType=federated plus a userPrincipalName in the tenant's ...onmicrosoft.com domain.

Problem:

  • This only affects returning users - ones who already have a session / remembered account in the tenant. On re-authentication (the app session has lapsed and the user is sent back through the IdP), a federated user can be dropped onto the local "Enter password" screen for their <guid>@<tenant>.onmicrosoft.com account, which has no password (they authenticate at the federated IdP). They have to back out and click the IdP button to proceed having seen what, to most users, looks like a very odd e-mail/username.
  • A first-time or incognito sign-in (no existing session) shows the normal combined page and works fine - which is what points at the returning-user / SSO path rather than fresh sign-in.
  • It is not reproducible on demand e.g. by trying to formulate a url of some kind, and sign-in logs show eventual success (only an AADSTS50140 "Keep me signed in" interrupt, then success) - though our understanding is this is because the user 'backs out' of this screen and chooses their workforce tenant again.

Questions:

  1. In a single user flow offering both email+password and a federated OIDC IdP, is there a supported way to route a returning federated user to their IdP rather than the local password path (any home-realm-discovery / email-domain-to-IdP mapping), without splitting into separate user flows/apps? or even just to stop it bothering to try and pre-fill the e-mail
  2. domain_hint needs the domain-based issuer and reportedly isn't always honoured for OIDC federation, and there's no portal HRD/domain mapping - is application-layer HRD (own landing page → collect email → derive domain → initiate the right provider / domain_hint) the only supported approach for mixed flows?
  3. Is native domain-based routing to a federated OIDC IdP in external tenants on the roadmap?

I've already reviewed the existing domain-routing threads - this question is specifically about the returning-user / re-authentication behaviour in a mixed local+federated flow.

Microsoft Security | Microsoft Entra | Microsoft Entra External ID

1 answer

Sort by: Most helpful
  1. Christos Panagiotidis 3,551 Reputation points
    2026-07-14T15:26:33.99+00:00

    Hi Craig, what you are seeing is consistent with the remembered-account path selecting the local account object before the custom OIDC provider is chosen. External ID user flows do not currently provide a portal-configurable email-domain-to-custom-OIDC home-realm-discovery rule, and domain_hint is only a hint, not a guaranteed routing control. For a dependable experience, use an application landing step that asks for the email/domain and then starts the correct sign-in path, or separate the local and federated populations into different user flows/app entry points. You can also force account selection when returning from an expired app session so the stale local choice is not silently reused. I would not build around an assumed roadmap item; ask Microsoft support/product engineering for written confirmation if native domain routing is a release requirement.

    Was this answer helpful?


Your answer

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