How the attack works
For a federated domain, Microsoft Entra ID does not check passwords itself: it accepts SAML or WS-Federation tokens signed by the identity provider configured on the domain. An attacker who holds a role that can manage domains and federation (Global Administrator, Hybrid Identity Administrator, Domain Name Administrator, External Identity Provider Administrator, Security Administrator) can convert a managed domain to federated, add a new verified domain and federate it, or add their own token-signing certificate to an existing federation configuration.
From then on the attacker signs tokens for any user in the domain, with any claims they choose, including a claim that MFA was performed. The effect matches a Golden SAML attack without stealing the original signing key; APT29 used it in the SolarWinds intrusion. The changes appear in the audit log as Set domain authentication and Set federation settings on domain; new domains appear as Add unverified domain followed by Verify domain. A subdomain inherits the authentication type of its root domain until it is promoted to a root domain, and a rule on this page reads that step as Promote sub domain to root domain.
What an attacker needs
- A compromised identity with a role that can manage domains and federation settings, or an application with equivalent Microsoft Graph permissions.
- For a new domain, the ability to publish the DNS verification record for a domain the attacker owns.
Impact
The ability to sign in as any user of the federated domain, including administrators, without their password and with self-asserted MFA. The trust persists until the federation configuration is found and removed, and it survives password resets of every account.
Detection rules
Domain Authentication or Federation Settings Changed
Detects a change to a domain's authentication type (managed or federated) or to its federation settings, such as the issuer URI or token-signing certificate. Microsoft recommends alerting on both activities because a rogue federation trust lets an attacker sign tokens for any user.
title: Domain Authentication or Federation Settings Changed
id: 8d4bef1b-9077-4c06-969d-4062d65e46a1
status: experimental
description: >-
Detects a change to a domain's authentication type (managed or federated) or
to its federation settings, such as the issuer URI or token-signing
certificate. Microsoft recommends alerting on both activities because a
rogue federation trust lets an attacker sign tokens for any user.
references:
- https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/how-to-connect-monitor-federation-changes
- https://attack.mitre.org/techniques/T1484/002/
author: Forestall
date: 2026-11-10
tags:
- attack.privilege-escalation
- attack.t1484.002
logsource:
product: azure
service: auditlogs
detection:
selection:
OperationName:
- Set domain authentication
- Set federation settings on domain
filter_failed:
Result: failure
condition: selection and not filter_failed
falsepositives:
- Planned federation changes and token-signing certificate renewals; match each event to a change record and to the identity provider's published metadata.
level: high
False positives
- Planned federation changes and token-signing certificate renewals; match each event to a change record and to the identity provider's published metadata.
New Domain Added and Verified in the Tenant
Detects a domain being verified or added as verified in Microsoft Entra ID. Adding a domain the attacker controls is the usual first step before federating it with a rogue identity provider.
title: New Domain Added and Verified in the Tenant
id: 62d68d4f-df55-45f8-8bba-bccd9c11a084
status: experimental
description: >-
Detects a domain being verified or added as verified in Microsoft Entra ID.
Adding a domain the attacker controls is the usual first step before
federating it with a rogue identity provider.
references:
- https://learn.microsoft.com/en-us/entra/identity/monitoring-health/reference-audit-activities
- https://attack.mitre.org/techniques/T1484/002/
author: Forestall
date: 2026-11-10
tags:
- attack.privilege-escalation
- attack.t1484.002
logsource:
product: azure
service: auditlogs
detection:
selection:
OperationName:
- Verify domain
- Add verified domain
filter_failed:
Result: failure
condition: selection and not filter_failed
falsepositives:
- New business domains being onboarded; confirm the domain is owned by the organization and expected.
level: medium
False positives
- New business domains being onboarded; confirm the domain is owned by the organization and expected.
Subdomain Promoted to a Root Domain
Detects the audit activity "Promote sub domain to root domain" of Core Directory. A subdomain inherits the authentication type of its root domain, so the subdomain of a managed domain cannot be federated on its own. Microsoft documents the way around that. The subdomain is promoted to a root domain through Microsoft Graph, and after that its authentication type can be set independently of the parent. An attacker who wants to federate a name that already belongs to the tenant, without touching the domain the defenders watch, promotes a subdomain first and federates it afterwards. Microsoft documents the promotion as a call to Microsoft Graph, and few tenants ever need it. Microsoft lists the activity name without describing the record, so the rule matches on the name only and is rated low. The step that gives the attacker access is the later change of the authentication type, which another rule on this page reads. The domain is in TargetResources and the actor in InitiatedBy.
title: Subdomain Promoted to a Root Domain
id: a1618bfe-9e61-4b60-9c49-ae60f8ec182c
status: experimental
description: >-
Detects the audit activity "Promote sub domain to root domain" of Core
Directory. A subdomain inherits the authentication type of its root domain,
so the subdomain of a managed domain cannot be federated on its own.
Microsoft documents the way around that. The subdomain is promoted to a
root domain through Microsoft Graph, and after that its authentication type
can be set independently of the parent. An attacker who wants to federate a
name that already belongs to the tenant, without touching the domain the
defenders watch, promotes a subdomain first and federates it afterwards.
Microsoft documents the promotion as a call to Microsoft Graph, and few
tenants ever need it. Microsoft lists the activity name without describing the record,
so the rule matches on the name only and is rated low. The step that gives
the attacker access is the later change of the authentication type, which
another rule on this page reads. The domain is in TargetResources and the
actor in InitiatedBy.
references:
- https://learn.microsoft.com/en-us/entra/identity/users/domains-verify-custom-subdomain
- https://learn.microsoft.com/en-us/entra/identity/monitoring-health/reference-audit-activities
- https://attack.mitre.org/techniques/T1484/002/
author: Forestall
date: 2026-11-18
tags:
- attack.privilege-escalation
- attack.defense-impairment
- attack.t1484.002
logsource:
product: azure
service: auditlogs
detection:
selection:
OperationName: Promote sub domain to root domain
filter_failed:
Result: failure
condition: selection and not filter_failed
falsepositives:
- Administrators who separate a subdomain from a federated root domain so that it can use managed authentication, which is the case Microsoft's article describes. Confirm the change with the team that owns the domain.
level: low
False positives
- Administrators who separate a subdomain from a federated root domain so that it can use managed authentication, which is the case Microsoft's article describes. Confirm the change with the team that owns the domain.
ID Protection Detected a Token Issuer Anomaly
Detects the Microsoft Entra ID Protection risk detection "Token issuer anomaly" (riskEventType tokenIssuerAnomaly). Microsoft raises it when the issuer of the SAML token used for a sign-in is potentially compromised, because the claims in the token are unusual or match known attacker patterns. It is the trace that forged federated tokens leave in Microsoft Entra ID, whether they were signed through a federation trust an attacker added or changed, or with a token-signing key stolen from the federation service (Golden SAML). The TokenIssuerType column says whether the issuer was Active Directory Federation Services. The detection is calculated offline and needs Microsoft Entra ID P2. Risk detections reach a SIEM through the UserRiskEvents diagnostic setting of Microsoft Entra ID.
title: ID Protection Detected a Token Issuer Anomaly
id: 2e5d22c8-eb80-40f7-a707-63973f08ff69
status: experimental
description: >-
Detects the Microsoft Entra ID Protection risk detection "Token issuer
anomaly" (riskEventType tokenIssuerAnomaly). Microsoft raises it when the
issuer of the SAML token used for a sign-in is potentially compromised,
because the claims in the token are unusual or match known attacker
patterns. It is the trace that forged federated tokens leave in Microsoft
Entra ID, whether they were signed through a federation trust an attacker
added or changed, or with a token-signing key stolen from the federation
service (Golden SAML). The TokenIssuerType column says whether the issuer
was Active Directory Federation Services. The detection is calculated
offline and needs Microsoft Entra ID P2. Risk detections reach a SIEM
through the UserRiskEvents diagnostic setting of Microsoft Entra ID.
references:
- https://learn.microsoft.com/en-us/entra/id-protection/concept-identity-protection-risks
- https://learn.microsoft.com/en-us/entra/id-protection/howto-identity-protection-investigate-risk
- https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/aaduserriskevents
- https://attack.mitre.org/techniques/T1484/002/
- https://attack.mitre.org/techniques/T1606/002/
author: Forestall
date: 2026-11-15
tags:
- attack.privilege-escalation
- attack.credential-access
- attack.t1484.002
- attack.t1606.002
logsource:
product: azure
service: riskdetection
detection:
selection:
RiskEventType: tokenIssuerAnomaly
condition: selection
falsepositives:
- Changes at your own identity provider that alter the claims it issues, such as a migration or new claim rules. Confirm with the team that runs the federation service before dismissing the detection.
level: high
False positives
- Changes at your own identity provider that alter the claims it issues, such as a migration or new claim rules. Confirm with the team that runs the federation service before dismissing the detection.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
Sign-in with a token from an identity provider you do not run
For a federated sign-in the sign-in log records which identity provider issued the token. A backdoor federation points a domain to the attacker's provider, so sign-ins of that domain's users start to carry an issuer that none of your federation services uses. A list of your issuers turns every such sign-in into an alert, even when the federation change itself was missed.
- Keep a list of the issuer names of your own federation services.
- Sign-in log: successful sign-ins (
ResultType0) whoseTokenIssuerTypeis ADFederationServices, withTokenIssuerName,UserPrincipalNameandIPAddress. - Alert when
TokenIssuerNameis not on the list, or appears for the first time in the tenant. - Raise the priority when the user holds a privileged role or the sign-in follows a
Set domain authenticationorSet federation settings on domainevent.
EventsSet domain authenticationSet federation settings on domain
LimitsMicrosoft describes TokenIssuerName only as the name of the identity provider, so record the values your own federation services produce before you build the list. A token forged with the stolen signing key of your own provider carries your issuer and is not found this way. A federation server added on purpose matches until the list is updated.
Triage
- Identify the domain (TargetResources) and the actor (InitiatedBy); compare the new issuer URI and signing certificate with your known identity provider.
- Check whether the domain was added or verified recently and whether anyone in the organization owns it.
- Review sign-ins for the domain's users after the change for tokens issued by an unfamiliar identity provider.
- If malicious, convert the domain back to managed or remove the rogue federation settings, then revoke sessions for affected users and review the actor's other changes.
Response
Once the attack is confirmed:
- Remove the rogue trust at once. Convert the domain back to managed authentication, or restore the issuer URI and token-signing certificate of your own identity provider. Remove a domain that was added only to be federated.
- Revoke the sessions of every user of the domain who signed in while the rogue trust was in place, administrators first. The attacker could sign in as any of them.
- Revoke the sessions and reset the credentials of the identity that changed the federation settings, and remove its role.
- Review what was done in the name of the users the attacker signed in as, and remove the persistence left behind, such as application credentials, role assignments and authentication methods.
- Check every federated domain of the tenant against your identity provider, and watch for new federation changes and token issuer anomaly detections.
Mitigation
- Keep the roles that can change domain authentication on a small number of cloud-only, phishing-resistant, PIM-protected accounts.
- Prefer managed authentication (password hash sync or pass-through authentication) where federation is no longer required.
- Review federated domains and their signing certificates and issuer URIs regularly; remove stale or unknown domains.
- Alert on every federation change and every new verified domain, and verify each against a change record.
Frequently asked questions
Do password resets remove a federation backdoor?
No. For a federated domain Microsoft Entra ID does not check passwords. It accepts tokens signed by the identity provider configured on the domain, and the attacker signs those themselves. The trust survives password resets of every account and lasts until the federation configuration is removed.
How does this differ from Golden SAML with a stolen signing key?
The result is the same, forged tokens for any user of the domain. Here the attacker changes the federation configuration of the tenant, which leaves `Set domain authentication` or `Set federation settings on domain` in the audit log. A key stolen from the federation service changes nothing in the tenant, so there the token issuer anomaly detection of ID Protection is the main trace in Microsoft Entra ID.
What does the token issuer anomaly rule depend on?
The detection needs Microsoft Entra ID P2 and is calculated offline, so it arrives after the sign-in. It reaches a SIEM only when the UserRiskEvents diagnostic setting of Microsoft Entra ID is exported. Changes at your own identity provider that alter the claims it issues can raise it too.
Why alert on a new verified domain?
Adding a domain the attacker owns is the usual first step before federating it with their own identity provider. New business domains are onboarded from time to time, so confirm that the organization owns the domain and expected it.
References
- MITRE ATT&CK T1484.002: Trust Modification
- Monitor changes to federation configuration in your Microsoft Entra ID
- Microsoft Entra audit log activities (Core Directory)
- SigninLogs table reference (SessionId, OriginalTransferMethod, AutonomousSystemNumber, TokenIssuerName, AuthenticationProcessingDetails)