Join our Newsletter — 33% off our NHI Course
Home› Guides› How to Detect New Federated Domains and IdP…
Guide Identity Visibility, Posture & Threat Detection

How to Detect New Federated Domains and IdP Trusts: Log Events and Alerts for Federation Backdoors

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 13 min read
On this page

An attacker who can add an identity provider or switch a domain to federated authentication can sign in as your users without their passwords or MFA, and the change is a single administrative action that most SOCs never alert on. This guide is a detection task page: which configuration objects create a federation trust in Microsoft Entra ID, Okta, AWS and on-premises Active Directory, the exact audit events each one writes, the alert rules to build, and how to triage a hit. It assumes you already understand the technique (MITRE ATT&CK T1484.002 Trust Modification) and the signing key side of the problem, which the Golden SAML and Federation Trust Abuse Defence Guide covers. It is written for detection engineers and identity platform owners. Platforms are listed alphabetically.

Key takeaways

  • Trust changes are rare and high value. A new identity provider, a domain switched from managed to federated, or a new SAML or OIDC provider happens a few times a year in most estates, so every event can be an alert without flooding the queue.
  • Each platform names the event differently. Entra writes "Set domain authentication" and "Set federation settings on domain", Okta writes system.idp.lifecycle.create, AWS CloudTrail records CreateSAMLProvider and CreateOpenIDConnectProvider, and Windows writes event 4706 for a new domain trust.
  • Modification matters as much as creation. Adding a second signing certificate or changing the issuer on an existing trust gives the same access as a new trust, so alert on updates and key changes too.
  • Detection needs an approval register. Alerts are only triageable when every legitimate trust is recorded with an owner, a change ticket and its expected configuration.
  • Prevention narrows the alert surface. Restrict who can create trusts (roles, AWS service control policies, protected admin actions), then treat any change by an unexpected principal as an incident.

What creates a federation trust

The objects below each let an external issuer assert identities that your platform accepts. Inventory them before writing rules, because the alert logic is "anything not in the register".

PlatformTrust objectEffect if an attacker adds or edits itWho can change it
Active DirectoryDomain and forest trusts; AD FS relying party and claims provider trustsPrincipals from the trusted domain can be granted access; altered AD FS claim rules can issue tokens for any userDomain and Enterprise Admins; AD FS administrators
AWSIAM SAML providers and OIDC providers; the external identity provider of IAM Identity CenterRoles whose trust policy names the provider can be assumed with assertions from it; an Identity Center identity source change affects every assigned accountPrincipals allowed iam:CreateSAMLProvider, iam:CreateOpenIDConnectProvider and the Identity Center administration actions
Microsoft Entra IDFederated domains (domain authentication set to Federated, with issuer, endpoints and signing certificate); SAML/WS-Fed IdP federation for external users; cross-tenant access settings that trust another tenant's MFA and device claimsA federated domain lets the configured issuer authenticate any user in that domain; external IdP federation admits users from the partner domain; trusted claims let another tenant satisfy your Conditional Access MFA requirementDomain changes: Global Administrator or Domain Name Administrator; external IdP federation: at least External Identity Provider Administrator
OktaIdentity providers (SAML, OIDC, Org2Org inbound) and their routing rules; IdP signing keysUsers can be signed in through the external IdP; with username mapping changed, an attacker-controlled IdP can impersonate real usersSuper administrators and custom roles with identity provider permissions

Workload federation, where a CI system or another cloud presents an OIDC token to obtain a cloud role, uses the same building blocks but is covered separately. See How to audit Entra workload identity federated credentials and the Workload Identity Federation Guide.

Log events to collect

PlatformLog sourceEventWhat it means
Active DirectoryDomain controller Security log (Audit Authentication Policy Change)4706A new trust was created to a domain. Microsoft's guidance is to alert on any trust change and investigate unplanned ones
AWSCloudTrail management events, eventSource iam.amazonaws.comCreateSAMLProvider, UpdateSAMLProvider, CreateOpenIDConnectProvider, AddClientIDToOpenIDConnectProvider, UpdateOpenIDConnectProviderThumbprintNew or changed SAML or OIDC trust that IAM roles can reference
AWSCloudTrail, eventSource sso.amazonaws.comIAM Identity Center configuration changes, including the identity source and trusted token issuersChange to the identity source used for every account assignment
Microsoft Entra IDAudit log, category DirectoryManagementSet domain authentication; Set federation settings on domainDomain switched between managed and federated, or issuer, endpoints or signing certificate changed
Microsoft Entra IDAudit log, category DirectoryManagementAdd unverified domain; Verify domain; Add verified domainNew domain added to the tenant; a verified domain is the precondition for federating it
Microsoft Entra IDAudit log, category CrossTenantAccessSettingsAny activityInbound or outbound partner settings changed, including trust of external MFA and device claims or cross-tenant synchronisation
Microsoft Entra IDAudit log, category DirectoryManagementCreate CompanyA new tenant created with an identity from your tenant; Microsoft lists it as a medium-risk item to monitor
OktaSystem Logsystem.idp.lifecycle.create, .update, .activate, .deactivate, .deleteIdentity provider created, changed or switched on or off
OktaSystem Logsystem.idp.key.create, .update, .delete; system.idp.lifecycle.read_client_secretIdP signing key changed, or an IdP client secret read
OktaSystem Loguser.authentication.auth_via_IDPA sign-in through an external IdP; Okta suggests alerting on it where inbound federation is not used

Retain these logs for longer than the platform default. A federation backdoor is often found months later, and Entra and Okta keep their native logs for a limited period, so forward them to your SIEM or data lake with at least [12 months] of retention.

Detection rules to build

Rule 1: any new trust (all platforms)

  • Logic: creation event from the table above (Entra Set domain authentication to Federated, Okta system.idp.lifecycle.create, AWS CreateSAMLProvider or CreateOpenIDConnectProvider, Windows 4706) where the target is not in the approval register.
  • Severity: high. Page the on-call analyst; do not batch into a daily digest.
  • Enrichment: actor, actor's sign-in context (device, IP, ASN, authentication method), change ticket lookup, and whether the actor activated a privileged role shortly before.

Rule 2: modification of an existing trust

  • Logic: Entra Set federation settings on domain, Okta system.idp.lifecycle.update or system.idp.key.*, AWS UpdateSAMLProvider or UpdateOpenIDConnectProviderThumbprint. Compare the new issuer, endpoints and certificate thumbprint with the register.
  • Why: ATT&CK notes that an adversary can add their own signing certificate to a trust without compromising the original one. A second certificate on a federated domain is a classic sign.

Rule 3: new domain followed by federation

  • Logic: in Entra, Add unverified domain or Verify domain followed by Set domain authentication on the same domain within [7 days]. Most legitimate federation projects federate long-established domains.

Rule 4: trust change by an unexpected principal or context

  • Logic: any event from Rules 1 to 3 performed by an identity outside the named trust administrators, by a service principal or automation account, from an unmanaged device, from an anonymising proxy, or outside a change window.
  • Note: automation that legitimately manages federation (for example infrastructure as code) should use one dedicated identity, so that every other actor is anomalous.

Rule 5: first sign-in through a new IdP

  • Logic: the first successful sign-in whose issuer is a trust created in the last [30 days], or, in Okta, user.authentication.auth_via_IDP where inbound federation is not expected. Correlate with Rule 1 to confirm whether the trust was used before triage started.

Rule 6: cross-tenant trust widened

  • Logic: Entra CrossTenantAccessSettings changes that enable trust of external MFA or device claims, add a partner, or allow inbound user synchronisation. Lower severity than Rule 1, but review within one working day.

Build the approval register first

  1. Export the current state. List federated domains and their issuers and certificate thumbprints in Entra, identity providers and their keys in Okta, SAML and OIDC providers in every AWS account (organisation-wide), the Identity Center identity source, AD domain and forest trusts, and AD FS relying party and claims provider trusts.
  2. Assign an owner and a reason to each trust. Unknown trusts found during the export are investigated as potential incidents, not added to the register by default.
  3. Record the expected configuration. Issuer URI, endpoints, certificate thumbprints and expiry, and the AWS roles whose trust policies reference each provider.
  4. Link the register to change management. A new trust is approved only with a ticket that names the register entry, so Rule 1 can check the ticket automatically.
  5. Re-baseline quarterly. Diff the live export against the register; drift is a finding even if no alert fired, because it means a log source or rule is missing.

Triage when an alert fires

QuestionWhere to lookEscalate if
Is there an approved change?Change ticket, register, identity teamNo ticket, or ticket does not match the issuer or domain seen
Who made it and how did they sign in?Sign-in logs for the actor around the eventNew device, unusual location or ASN, MFA method changed recently, help desk reset shortly before
Has the trust been used?Sign-ins via the new issuer (Rule 5), AWS AssumeRoleWithSAML or AssumeRoleWithWebIdentity eventsAny sign-in or role assumption you cannot attribute to the approved project
What else did the actor change?All audit events by the actor in the last [72 hours]Role assignments, new app credentials, Conditional Access or sign-on policy edits

Containment for an unapproved trust is to deactivate or remove it, revoke sessions issued through it, and remove the actor's privileges pending investigation. Preserve the audit events and an export of the trust configuration before deleting anything. The Identity Provider Tenant Compromise Playbook covers the wider response.

Prevent and narrow the attack surface

  • Entra ID: keep domain and external identity provider roles in privileged access management with approval, and limit standing Global Administrators. Microsoft documents that SAML/WS-Fed IdP federation needs at least External Identity Provider Administrator, and that only one wildcard (domainless) IdP can exist per tenant, so review any wildcard configuration closely.
  • Okta: Okta's cross-tenant impersonation guidance recommends Protected Actions for sensitive admin changes, dedicated admin sign-on policies with phishing-resistant MFA and managed devices, and least-privilege custom admin roles instead of standing super administrators.
  • AWS: ATT&CK's mitigation for T1484.002 suggests service control policies that restrict CreateSAMLProvider and CreateOpenIDConnectProvider; apply them to member accounts and allow only the identity platform's pipeline role.
  • Active Directory: limit Domain and Enterprise Admins, and administer AD FS from tiered admin workstations. See the Federation and Trust Relationships Guide for trust design.

Implementation plan

  1. Week 1: confirm each log source reaches the SIEM (Entra audit log, Okta System Log, CloudTrail organisation trail including IAM events, domain controller Security logs with Audit Authentication Policy Change enabled). Generate a test event in a lab tenant or account to prove ingestion.
  2. Weeks 2 to 3: build the approval register and investigate unknown trusts.
  3. Week 4: deploy Rules 1 and 2 in alert mode; test them by creating and removing a test IdP in a non-production tenant and a SAML provider in a sandbox account.
  4. Weeks 5 to 6: add Rules 3 to 6, enrichment and the change ticket lookup; write the triage runbook.
  5. Ongoing: apply the preventive restrictions, re-baseline quarterly and run a purple-team test once a year.

Rollback: detection rules can be disabled without side effects. Preventive controls can break legitimate federation projects: introduce AWS service control policies and Okta Protected Actions with a named exception path, and test them in a sandbox first.

Measuring it

  • Log source coverage: percentage of tenants, Okta orgs, AWS accounts and AD forests whose trust events reach the SIEM (target 100%).
  • Register accuracy: number of live trusts not in the register at each quarterly diff (target zero).
  • Time to triage: median minutes from a Rule 1 alert to an approved or malicious verdict.
  • Test pass rate: share of planned test changes that raised the expected alert.
  • Privileged trust administrators: count of identities able to create trusts, trending down.

Common failure patterns

  • Only creation is monitored. Updates to an existing trust (a new certificate, a changed issuer) carry the same risk and are missed.
  • IAM events are not in the trail. CloudTrail coverage is per account and organisation trail design varies; a member account outside the trail can host an unmonitored SAML provider.
  • Okta inbound federation is ignored. In the attacks Okta described in 2023, actors configured a second identity provider as an impersonation app and changed usernames so it matched real users. The system.idp.lifecycle events were the signal.
  • The alert goes to a digest. Trust changes are rare enough to page on; a daily report gives an attacker a day of access.
  • Unknown trusts are grandfathered. Adding every existing trust to the register without investigation can whitelist a backdoor that predates the detection.

Framework mapping

FrameworkReferenceHow this guide applies
MITRE ATT&CKT1484.002 Trust Modification; T1606.002 SAML Tokens; T1556.007 Hybrid IdentityDetects the trust change itself; forged tokens and hybrid identity changes are adjacent techniques with their own pages
NIST SP 800-53 Rev. 5AU-6, AU-12, SI-4, CM-3Audit record generation and review for trust events, system monitoring, change control linkage
NIST CSF 2.0DE.CM-03, DE.AE-02Monitoring technology usage and analysing potentially adverse events
OWASP Non-Human Identities Top 10 (2025)NHI3 Vulnerable Third-Party NHIExternal issuers and partner tenants are third-party trust that needs an owner and review

Practitioner checklist

  • Inventory every federation trust in Entra, Okta, AWS and Active Directory, with owner and expected configuration.
  • Confirm Entra audit, Okta System Log, CloudTrail IAM and domain controller 4706 events reach the SIEM with 12 months' retention.
  • Alert at high severity on any new trust not in the register.
  • Alert on trust modifications and signing key changes, not only creation.
  • Correlate new domains with later federation in Entra.
  • Flag trust changes by unexpected actors, automation or risky sign-in context.
  • Watch for first sign-ins through newly created trusts.
  • Restrict trust creation with privileged roles, Okta Protected Actions and AWS service control policies.
  • Test every rule in a sandbox and re-baseline the register quarterly.

Standards and references

Related NHI Mgmt Group resources: Golden SAML and Federation Trust Abuse Defence Guide · MITRE ATT&CK T1484 Domain or Tenant Policy Modification Guide · Identity Federation Failure Modes · Federation and Trust Relationships Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.