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:
- 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
- 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?
- 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.