I'm setting up federation between a Microsoft Entra External ID (CIAM) tenant and a Microsoft Entra ID (workforce) tenant, following the steps in Add a Microsoft Entra ID tenant as an OpenID Connect identity provider. I've completed all the documented configuration steps — registering the external tenant as an application in the Microsoft Entra ID tenant, configuring the custom OIDC identity provider in the External ID tenant, and adding the identity provider to my sign-up/sign-in user flow with the application assigned to it.
When testing the flow, I select the federated identity provider option on the sign-in page and I'm redirected to the Microsoft Entra ID tenant. Authentication itself works correctly, including multi-factor authentication (I complete this via an authenticator app). Immediately after MFA succeeds, sign-in fails with:
AADSTS50020: User account does not exist in the External ID tenant and cannot access the application in that tenant. The account needs to be added as an external user in the tenant first.
According to the documentation, a user account should be automatically created in the External ID tenant the first time someone signs in successfully through the federated identity provider. However, no external/guest user is being created at all — I checked the Users list in the External ID tenant and nothing new appears after the failed attempt.
I also tried using domain_hint for issuer acceleration when initiating sign-in (as described in the same documentation), to rule out an issue with identity-provider selection on the sign-in page itself — same result: authentication and MFA succeed, then AADSTS50020, and no user is provisioned.
Since authentication succeeds at the identity-provider tenant (including MFA), but automatic account provisioning in the External ID tenant never happens, I'd like help understanding:
- At which step the automatic external-user provisioning is failing or being skipped, ideally based on server-side sign-in logs.
- Whether there are additional prerequisites beyond what's documented (e.g., tenant-level settings) required for that automatic provisioning to actually occur.
- Whether AADSTS50020 in this specific context (a federated custom OIDC sign-in where provisioning should be automatic) can have causes other than "the account doesn't exist and must be manually created," since no such manual step is described as necessary for this flow.