Microsoft Entra ID
Authentication

Strengthen federated sign-in security

In brief

The documentation now distinguishes standard token validation, user mapping, and authentication policy checks from the additional domain-consistency validation provided by Federated Token Validation Policy. It also clarifies root-domain matching for federated sign-ins.

What Entra admins need to know

Administrators get clearer guidance for understanding how federated sign-ins and the policy’s security checks work together.

This editorial summary was generated by AI from the documentation changes. Verify important details in the full Microsoft Learn article.

Documentation change

The comparison below shows only the changed extract. Use the full-page view for complete context.

Strengthen federated sign-in security in Microsoft Entra ID

Organizations can configure Microsoft Entra ID to trust an external identity provider, such as Active Directory Federation Services (AD FS), or another SAML identity provider, for user authentication. Federated authentication remains a secure and recommended deployment model when configured and managed according to Microsoft guidance. In a federated sign-in, the identity provider authenticates the user and issues a federation token. Microsoft Entra ID validates the token,incoming token and maps it to a user account in the tenant,tenant. As part of this process, Entra performs a series of security and completespolicy checks, including token signature validation, trusted issuer and federation trust verification, token lifetime validation, account mapping, and evaluation of applicable Conditional Access and multifactor authentication requirements. When all validations and policy requirements are successfully met, the sign-in when all applicable checks succeed.is completed.

Federated Token Validation Policy adds a domain-consistency check. It can reject a sign-in whenan additional defense-in-depth control. The policy helps ensure that the root domain represented by the trusted federation realm doesn't matchis consistent with the root domain of the mapped Microsoft Entra user account. This checkadded domain-consistency validation helps preserve the intended security boundary betweenreinforce trust boundaries in tenants that use multiple federated domains in the same tenant.domains.

A federated domain is a verified Microsoft Entra domain whose authentication is delegated to a trusted identity provider. Federation configuration is represented by an internalDomainFederation object. This object is typically created as part of federation setup, including common AD FS or other identity-provider configuration experiences. Administrators might not create it directly.

What is cross-domain sign-in?

Cross-domainSimplified federated sign-in occurs whenflow

  1. A user enters a UPN, such as [email protected].
  2. Microsoft Entra ID identifies the domain as federated and directs authentication to the configured identity provider.
  3. The identity provider authenticates the user and returns a signed federation token is accepted from one trusted federation realm buttoken.
  4. Microsoft Entra ID validates the token, including its signature, issuer, validity period, and trust relationship.
  5. Microsoft Entra ID maps the assertion to a Microsoft Entra user whose user principal name (UPN) belongs toaccount.
  6. Microsoft Entra ID applies applicable authentication, Conditional Access, and multifactor authentication requirements.
  7. Federated Token Validation Policy can apply an additional domain-consistency validation before sign-in completes.

Existing validation in federated sign-in

Federated authentication relies on established trust between Microsoft Entra ID and the configured identity provider. Before a different root domain. For example,federated sign-in succeeds, Microsoft Entra ID validates that the token was issued by a trusted federation configuration and that the token issued through the trust for domain B mapscan be mapped to a user whose UPN belongs to domain A.in the tenant.

Without strict domain validation,Depending on tenant configuration and sign-in context, Microsoft Entra ID can accept a token whenalso enforce additional controls such as Conditional Access, multifactor authentication, sign-in risk policies, device requirements, and application authorization. Federated Token Validation Policy doesn't replace these existing protections. It adds another validation layer that helps confirm the token is otherwise valid andfederated trust being used aligns with the asserted identity maps to a user, even ifdomain of the issuing trusted realm and the user UPN belong to different domains. In a tenant with multiple trustedMicrosoft Entra account being accessed.

How Federated Token Validation Policy strengthens federation realms, that behavior can weaken the intended separation between those realms.

Simplified federated sign-in flow

  1. A user enters a UPN, such as [email protected].
  2. Microsoft Entra ID identifies the domain as federated and directs authentication to the configured identity provider.
  3. The identity provider authenticates the user and returns a signed federation token.
  4. Microsoft Entra ID validates the token, including its signature and validity, and uses federation data in the token to map the assertion to a Microsoft Entra user.
  5. Federated Token Validation Policy determines whether an additional domain-consistency rule should block the sign-in.

How Federated Token Validation Policy works

The federatedTokenValidationPolicysecurity

The federatedTokenValidationPolicy resource controls additional validation of federation authentication tokens. It works with the internalDomainFederation object, which maps on-premises federated domains to their corresponding Microsoft Entra ID domains.

When validation is enforced, Microsoft Entra ID compares the federated account or trusted realm root domain with the root domain of the mapped Microsoft Entra account. Users

If the root domains match, sign-in can authenticate successfully only when the verified domain associated with the mapped Microsoft Entra user matches a verified federated domain associated with the authenticating identity provider or trusted realm.

continue, subject to all other authentication and policy checks. If the root domains don't match, Microsoft Entra ID rejects the authentication request.

Scenario Expected result with strict domain matching
The federation realm root domain matches the user UPN root domain. Sign-in can continue, subject to all other authentication and policy checks.
The federation realm root domain differs from the user UPN root domain. Sign-in is blocked by Federated Token Validation Policy.
The user UPN uses a child domain of the same root domain. The policy evaluates the root domain. The child domain isn't treated as a separate root domain.
A custom configuration explicitly permits cross-domain behavior. Cross-domain sign-in can be allowed, but the tenant doesn't receive this behavior is less secure and is strongly discouraged.additional domain-consistency protection.

This protection is especially importantuseful in tenants with multiple federated domains because it preventshelps reduce the blast radius of a compromised or misconfigured federated identity provider. It also reinforces trust boundaries between independently managed federated domains in the same tenant.

What is cross-domain sign-ins thatin?

Cross-domain sign-in occurs when a federation token is accepted from one trusted federation realm but maps to a Microsoft Entra user whose UPN belongs to a different root domain.

For example, a token issued through the trust for domainB.com maps to a user whose UPN belongs to domainA.com.

Some organizations intentionally rely on cross-domain behavior for legacy, merger, acquisition, coexistence, or migration scenarios. Federated Token Validation Policy helps administrators identify and control this behavior more explicitly.

Additional protection provided by the policy

Federated Token Validation Policy helps prevent one trusted federation realm from being used to authenticate as users assigned to another root domain when those domains should be independently managed.

The relevant attack scenario requires several prerequisites, including:

  • A tenant with multiple federated domains or federation realms.
  • A compromised, malicious, or improperly controlled trusted identity provider.
  • Knowledge of the target user's immutable ID or source anchor.
  • An identity provider or identity store capable of issuing or configuring arbitrary source anchor values.

In hybrid identity environments, users are linked to their Microsoft Entra accounts by using an immutable ID, which serves as a persistent identifier across the on-premises directory and cloud. This identifier is commonly stored in the onPremisesImmutableId property of the user object in Microsoft Entra ID and often originates from the ms-DS-ConsistencyGuid attribute.

If all prerequisites are met, an attacker who controls one trusted federation realm might attempt to issue a token that maps to a user in another realm by asserting that user's source anchor. Federated Token Validation Policy helps block this type of cross-domain access when the root domain of the trusted federation realm doesn't match the root domain of the mapped Microsoft Entra user.

Example cross-realm impersonation scenario

Assume a Microsoft Entra tenant contains:

If identity provider B is compromised or permits arbitrary source anchor values, an attacker could bypasscreate another user:

LocationUserSource anchor
Identity provider B[email protected]user1A

A token issued by identity provider B for [email protected] could map to the cloud account for [email protected] if only the source anchor mapping succeeds and no domain-level trust boundaries.consistency validation is enforced.

Setting Federated Token Validation Policy to validate root domains helps prevent this cross-domain access because the token's federation realm root domain and the mapped user's UPN root domain don't match.

Subdomain sign-in behavior

Sign-ins from subdomains, such as [email protected], aren't considered cross-domain sign-ins when the domains share the same root domain, such as contoso.com. These sign-ins continue to be allowed when Federated Token Validation Policy is enabled.

When a user signs in, Microsoft Entra ID extracts the root domain from the UPN and validates it against the root domain used by the federated identity provider. Sign-in is allowed when the root domains match. Otherwise, sign-in is blocked.

This approach provides appropriate securitydomain validation because subdomains typically share the same federation configuration and issuer as the root domain. If a distinct federation configuration is required, first promote the subdomain to a root domain. The policy then validates it independently.

Security risk without the policy

In hybrid identity environments, users are linked to their Microsoft Entra ID accounts by using an immutable ID, which serves as a persistent and unique identifier across both on-premises Active Directory and the cloud. This identifier is important for maintaining consistent identity mapping, especially in tenants with multiple federated domains where each domain is associated with a distinct realm and identity provider, such as AD FS or a SAML identity provider.

The immutable ID is typically stored in the onPremisesImmutableId property of the user object in Microsoft Entra ID. This property contains a Base64-encoded value that originates from the on-premises directory, most commonly derived from the ms-DS-ConsistencyGuid attribute. This value is known as the source anchor and is a foundational element in Microsoft Entra Connect synchronization and federation scenarios.

When Federated Token Validation Policy isn't enabled, an attacker can exploit cross-realm impersonation in tenants configured with at least two federated domains and two federated realms. If an attacker gains administrative control of a federated identity provider, or control of any identity store and claims-issuance process trusted by that identity provider, the attacker might be able to issue assertions that contain arbitrary identity attributes, including values used for account mapping.

For example, an attacker who controls realm A's identity provider and knows the immutable ID of a user in realm B could:

  • Create a spoofed account in realm A that uses that immutable ID.
  • Authenticate through realm A.
  • Illegitimately access the user's account in realm B.

Example cross-realm impersonation scenario

Assume a Microsoft Entra tenant contains the following configuration:

An attacker could create another user in identity provider B:

LocationUserSource anchor
Identity provider B[email protected]user1A

The legitimate setup between the Microsoft Entra tenant and identity provider A can be replicated in identity provider B if the federated identity provider permits an arbitrary source anchor to be configured. A bad actor can place the source anchor for [email protected] on the [email protected] user in the on-premises directory or identity store.

During authentication, a SAML token issued by identity provider B for [email protected] matches the cloud account of [email protected]. This gives the attacker access to that account without knowing credentials, such as a password, for the account in identity provider A.

Setting Federated Token Validation Policy to validate all root domains prevents this type of cross-domain access when the tenant domain of the mapped UPN and the identity provider domain don't match.

How Microsoft is strengthening security

Microsoft uses a stricter default that blocks cross-domain sign-ins when the federation realm root domain and the mapped user UPN root domain don't match. The change applies to federated domains that have an associated internalDomainFederation object.

  • A blocked authentication request is expected to return error AADSTS5000820: Sign-in blocked by Federated Token Validation policy. Contact your administrator for details.

  • A custom configuration can permit cross-domain sign-in,in for intentional scenarios. However, allowing cross-domain sign-in restores previous behavior and removes this additional domain-consistency validation layer.

    Identify all federated domains in the tenant, and confirm which domains have an associated internalDomainFederation configuration.

    Identify intentional cross-domain sign-in dependencies

    Review intentional cross-domain sign-in scenarios, including:

    • Coexistence environments.
    • Shared identity providers.
    • Migration projects.
    • Configurations where users authenticate through a federation realm that differs from their UPN domain.

    Validate representative sign-in scenarios

    Test representative users from parent domains and child domains to help identify common configuration issues. Root-domain comparison can cause a child domain to behave differently from a separate root domain.

    Successful testing doesn't guarantee that every sign-in path in the tenant has been exercised or that all users are unaffected after enforcement is enabled.

    Monitor for AADSTS5000820

    After enforcement is enabled, monitor Microsoft Entra sign-in logs for AADSTS5000820 errors. Investigate affected users to identify previously undiscovered cross-domain sign-in dependencies or configuration issues.

    Evaluate policy exceptions carefully

    Configure less-restrictive validation settings only when there's a documented business requirement. Disabling or narrowing validation can restore previous behavior for intentional cross-domain scenarios, but it also removes an additional layer of protection that helps reinforce domain trust boundaries.

    Organizations that allow cross-domain sign-in should evaluate compensating controls such as multifactor authentication, Conditional Access, trusted identity-provider governance, privileged access controls, and application-authorization policies.

    Policy administration

    The rootDomains property defines the types of domains to which validation applies.

    all

    Validates every verified domain in the tenant. This option provides the broadest domain-consistency validation. This option is appropriate for organizations that want to block cross-domain sign-in scenarios or require the strongest validation posture.

    • [email protected] signs in by using a token from identity provider A for domainA.com. The root domains match, so sign-in is allowed.
    • [email protected] signs in by using a token from identity provider A for domainA.com. The token is associated with domainA.com, but organizations lose an additional layer of domain validation that can help detect configuration issues or unexpected identities.the mapped account belongs to domainB.com. Sign-in is blocked.

    allFederated

    Validates only users whose mapped Microsoft Entra account domain is federated. Federated domains are protected, while managed domains are excluded from validation. This option is appropriate for organizations that have many federated domains and want to protect federated trusts while leaving managed accounts unaffected.

    Assume that domainA.com and domainB.com are federated, and domainC.com is managed:

    • [email protected] has a token from identity provider A. The mapped account domain is federated, so validation applies. Because the root domains don't match, sign-in is blocked.
    • [email protected] has a token from identity provider A. The mapped account domain is federated, so validation applies. Because the root domains match, sign-in is allowed.
    • [email protected] has a token from identity provider A. The mapped account domain is managed, so validation doesn't apply and sign-in is allowed.

    allManaged

    Validates only users whose mapped Microsoft Entra account domain is managed. Managed domains are protected, while federated domains are excluded from validation. This option is appropriate when an organization wants to protect managed identities from tokens from unrelated federated domains but has historical federated-to-federated cross-domain scenarios that it isn't ready to break.

    • [email protected] has a token from identity provider A. The mapped account domain is managed, so validation applies. Because the domains don't match, sign-in is blocked.
    • [email protected] has a token from identity provider A. The mapped account domain is managed, so validation applies. Because the domains don't match, sign-in is blocked.
    • [email protected] has a token from identity provider A. The mapped account domain is federated, so validation doesn't apply and sign-in is allowed.

    enumerated

    Blocks sign-in if the user's mapped account domain is included in the specified domain list and the incoming token's root domain doesn't match. This option supports phased rollout. For example, an organization can validate selected domains that are ready for enforcement while temporarily excluding domains that require additional testing or migration.

    The following example validates three domains:

    • [email protected] has a token from identity provider B. The mapped account domain is in the enumerated list, so validation applies. Because the domains don't match, sign-in is blocked.
    • [email protected] has a token from identity provider B. The mapped account domain isn't in the enumerated list, so validation doesn't apply and sign-in is allowed.

    allManagedAndEnumeratedFederated

    Validates all managed domains and only the federated domains explicitly listed in the policy. Federated domains that aren't listed are excluded from validation. This option provides immediate protection for all managed domains and gradual rollout for federated domains.

    Assume that domainA.com, domainB.com, and domainC.com are federated, and domainD.com and domainE.com are managed. The following example enumerates two federated domains:

    • domainD.com and domainE.com, because they're managed.
    • domainA.com and domainB.com, because they're enumerated federated domains.

    none

    Disables cross-domain validation. No root-domain matching occurs. This setting can be used to preserve intentional cross-domain sign-in behavior, such as certain legacy, acquisition, coexistence, or migration scenarios. However, it removes the additional domain-consistency protection provided by Federated Token Validation Policy.

    For example, [email protected] signs in by using a token from identity provider A for domainA.com. The token is associated with domainA.com, but the mapped user account belongs to domainB.com. Because validation is disabled, sign-in is allowed.

    Frequently asked questions

    Can an administrator allow cross-domain sign-in?

    Yes. An administrator can allow cross-domain sign-in by configuring the validatingDomains resource to use a less-restrictive setting, including none.

    This configuration can be used for intentional cross-domain scenarios but removes the additional domain-consistency validation layer. Organizations should use less-restrictive settings only when required and should apply appropriate compensating controls.

    Next steps

Daily Entra.News

Get daily email updates

Get a concise summary of the latest Microsoft Entra updates delivered straight to your inbox.

Loading the secure signup form…