An attacker with administrator access to your identity provider controls every application that trusts it, and ordinary account takeover playbooks do not cover what to do when the control plane itself is compromised. In an IdP tenant compromise, the attacker may have reset administrators' MFA, added their own identity provider through inbound federation, granted roles to new accounts or stolen admin session tokens, and every one of those has to be undone in the right order without locking out the responders. This template gives a playbook for a compromised Okta, Microsoft Entra ID or Google Workspace tenant, with roles, decision points, containment order, evidence to preserve and recovery steps. It is for incident responders, IAM engineers and security leaders, and assumes the hardening in the Identity Provider and SSO Security Guide.
How to use this template
- Replace text in square brackets, such as [Organisation], [IAM lead] and [IdP], with your own names, and fill in the contact table in section 2 before you need it.
- "Must" marks a required step; "should" marks a recommended step that the incident commander may skip with a recorded reason.
- The steps are written for the three common workforce IdPs. Where they differ, the platform-specific action is given in the tables; check your tenant's current admin console labels before an incident.
- Run a tabletop exercise against this playbook at least once a year, including the scenario where the IdP admin console cannot be trusted.
- Use it alongside your Incident Response Plan Template; this playbook covers the identity-specific steps only.
1. Scope and triggers
This playbook applies to any suspected or confirmed unauthorised control of [Organisation]'s workforce identity provider tenant ([Okta / Entra ID / Google Workspace]), including administrator accounts, federation and trust settings, authentication policies, API tokens and the directory synchronisation layer.
The playbook must be invoked when any of the following is observed:
- An administrator account signs in from an unknown device, network or anonymising proxy, or uses a stolen session.
- MFA factors are reset for an administrator without a verified request (in Okta, the System Log event
user.mfa.factor.reset_all). - A new identity provider or federation trust is created or modified (Okta
system.idp.lifecycle.*events; Entra domain authentication changed to federated or a new federation certificate; a new third-party SSO profile in Google Workspace). - A privileged role is granted outside the approved process or just-in-time tooling.
- Authentication policies are weakened, for example a second factor removed or an exclusion added.
- A vendor, supplier or customer reports that your tenant or your support files were used against them.
- The IdP vendor notifies [Organisation] of a security incident affecting its customers.
A compromise of a single non-privileged user account is handled under the standard account compromise procedure unless it leads to any trigger above. See the Identity Incident Response Playbook.
2. Roles and contacts
| Role | Responsibility | Named person and backup |
|---|---|---|
| Incident commander | Owns decisions, severity and timeline; approves disruptive containment | [Name / backup] |
| IAM lead | Executes IdP containment and recovery; holds break-glass procedure | [Name / backup] |
| Forensic lead | Exports and preserves IdP logs before changes; builds timeline | [Name / backup] |
| Application owners | Revoke sessions and local admin accounts in downstream SaaS and cloud | [List or group] |
| Service desk manager | Freezes resets, applies enhanced caller verification | [Name / backup] |
| Communications and legal | Internal messages, regulator and customer notification decisions | [Name / backup] |
| IdP vendor support | Vendor security escalation, log retrieval beyond tenant retention | [Support contract ID, security contact] |
Responders must communicate on a channel that does not authenticate through the compromised IdP, such as a pre-agreed out-of-band chat or conference bridge, because the attacker may be reading corporate email and chat.
3. Detection and triage
- Preserve logs first (must): export the IdP audit and sign-in logs for at least 90 days before making changes. Okta System Log, Entra sign-in and audit logs, and Google Workspace admin and login audit logs all have limited in-console retention; Entra keeps 7 days on Free and 30 days on P1 and P2 unless exported.
- Identify the attacker's footprint: list every action by suspect accounts and sessions: role grants, MFA resets and new factors, new users, new identity providers or federation changes, policy changes, API tokens, OAuth app registrations and secrets, and new devices.
- Find the entry point: help desk reset (check tickets and call records), stolen session token, phished credentials, compromised sync server or a vendor support channel. In the Okta support system breach, session tokens in HAR files uploaded to support cases were used to hijack customer admin sessions.
- Classify severity: critical if a super administrator or global administrator, federation trust or authentication policy was changed; high if a lesser admin role was used.
- Decide containment mode: the incident commander decides between targeted containment (the attacker's accounts and sessions are known) and full tenant lockdown (scope unknown, top-level admin compromised, or federation altered).
| Evidence | Okta | Entra ID | Google Workspace |
|---|---|---|---|
| Admin sign-ins | System Log user.session.start, policy.evaluate_sign_on for the Admin Console | SigninLogs for admin accounts; non-interactive logs for token use | Login audit log for admin accounts |
| MFA changes | user.mfa.factor.reset_all, system.mfa.factor.* | Audit "User registered security information", "Admin registered security info" | Admin audit log, 2-Step Verification changes |
| Federation and IdP changes | system.idp.lifecycle.*, user.authentication.auth_via_IDP | Domain authentication and federation settings changes; new federation certificates | Third-party SSO profile changes in the admin audit log |
| Role grants | Administrator role assignment events | "Add member to role", PIM changes | Admin role assignment events |
| Proxy and session anomalies | securityContext.isProxy, security.session.detect_client_roaming | Identity Protection anomalousToken, unfamiliarFeatures | Suspicious login alerts |
For log-level detail see the Okta System Log Detection Guide and the Entra ID Sign-In and Audit Log Detection Guide.
4. Containment
Containment must follow this order. Removing access before securing your own administrative path risks locking responders out; revoking sessions before removing a rogue federation lets the attacker sign straight back in.
- Secure the responders: confirm two break-glass accounts work, use phishing-resistant factors, and are excluded from changes you are about to make. Rotate their credentials if there is any chance they were exposed. See the Break-Glass Account Guide.
- Remove attacker trust paths: delete or disable any identity provider, inbound federation, Org2Org connection, federated domain or certificate the attacker created or changed (T1484.002). Okta's analysis of cross-tenant impersonation describes attackers adding a second IdP and changing the username mapping so they could sign in as real users; CISA describes Scattered Spider adding a federated IdP with automatic account linking.
- Remove attacker accounts and roles: disable accounts the attacker created, and remove roles they granted (T1098.003). Reduce top-level administrators to the minimum responders.
- Remove attacker factors: delete MFA factors and authentication methods registered by the attacker (T1556.006), and reset factors for affected admins in person or by verified video.
- Revoke sessions and tokens: for every affected account, revoke IdP sessions and refresh tokens. In Entra, disable the account where needed, select Revoke sessions (Revoke-MgUserSignInSession) and disable registered devices; in a hybrid tenant also disable the on-premises account and reset its password twice. In Okta, clear user sessions including OAuth tokens. In Google Workspace, reset sign-in cookies (suspending a user also resets them) and revoke third-party app access.
- Rotate tenant secrets: IdP API tokens, SCIM and provisioning tokens, OAuth client secrets, SAML signing certificates where exposure is possible, and directory sync service account passwords.
- Freeze changes: pause help desk password and MFA resets for privileged users, require dual approval for admin changes, and block sign-in to admin consoles from anything other than managed devices.
- Contain the sync layer: if the directory synchronisation servers or agents are suspected, isolate them. MGM shut down its Okta Sync servers during its 2023 incident; see the MGM Resorts breach.
| Token or session | Revoked by IdP action? | Additional step |
|---|---|---|
| IdP session cookie | Yes | None |
| Refresh tokens issued by the IdP | Yes (Entra Revoke sessions; Okta clear sessions with OAuth tokens) | Confirm in non-interactive sign-in logs that refresh fails |
| Access tokens already issued | No; valid until expiry (Entra default about one hour) unless the app supports Continuous Access Evaluation | Wait out lifetime or block in the app |
| Downstream SaaS application sessions | No; Microsoft notes the application must end its own session | Application owners revoke sessions in each critical app |
| Google app sessions | Not by cookie reset alone; Google notes reset does not sign users out of apps such as Gmail | Suspend the user or sign out devices |
| Local accounts and API keys in SaaS apps | No | Review and rotate in each app |
5. Eradication
- Diff the tenant configuration: compare authentication policies, sign-on policies, Conditional Access, network zones, admin roles, identity providers, application assignments and provisioning settings against the last known-good export or infrastructure-as-code baseline, and revert every unexplained change.
- Review applications and integrations: remove app registrations, OAuth clients and secrets the attacker added (T1098.001), and recheck consent grants. See the Consent Phishing and Illicit OAuth Grants Guide.
- Check for forged token capability: if signing certificates, federation servers or token signing keys may have been accessed, rotate them and treat forged SAML tokens (T1606.002) as possible. See the Golden SAML and Federation Trust Abuse Defence Guide.
- Sweep downstream systems: in cloud consoles, code platforms and critical SaaS, look for accounts, keys, admin grants and forwarding rules created during the attacker's window.
- Close the entry point: fix the help desk process, remove the exposed service credential or patch the sync server.
6. Recovery
- Restore admin access in stages: re-enable administrators one at a time with phishing-resistant MFA enrolled under verification.
- Apply hardened admin policy: managed devices only, phishing-resistant factors, re-authentication for every admin console session, denial of anonymising proxies and session binding to network where the platform supports it; Okta recommends Protected Actions and custom admin roles instead of standing super administrators.
- Re-enable federation and sync only after configuration has been verified and secrets rotated.
- Lift the change freeze with dual approval retained for privileged changes for at least [30] days.
- Heightened monitoring: keep alerts on the triggers in section 1 at critical priority for [90] days, and watch for reuse of any credential or token from the incident window.
7. Communication and notification
- Internal: brief staff out of band, warn about follow-up phishing and fake help desk calls, and tell them how to verify genuine instructions.
- Vendor: open a security case with the IdP vendor and request logs beyond tenant retention where needed.
- Downstream parties: notify SaaS vendors and customers whose tenants trust yours, and partners connected by federation or B2B access.
- Regulatory: legal must assess personal data breach notification duties, sector and national reporting rules (for example, United States organisations may report to CISA or the FBI, as the Scattered Spider advisory advises) and contractual notice periods. See the Cyber Incident Reporting Requirements Map.
- Record: keep a decision log of every containment action with time, person and reason.
8. Post-incident review
- Hold the review within [10] working days, using the Post-Incident Review and Root Cause Analysis Template.
- Answer: how did the attacker get admin access, how long before detection, which alert fired first, what slowed containment, and which downstream systems were reached.
- Track actions to closure: help desk verification, admin role reduction, phishing-resistant factors for all admins, log export and retention, configuration baselines and alert coverage for every trigger in section 1.
- Update this playbook and rerun the tabletop with the lessons learned.
Implementation guidance
The playbook works only if the preparation is done before an incident. NIST SP 800-61 Rev. 3 (Final, April 2025) aligns incident response with the CSF 2.0 functions, and most of the work here sits in Govern, Protect and Detect rather than Respond.
- Export logs continuously: stream IdP logs to a SIEM with at least 12 months of retention, so that step 1 of triage is a query, not a race against retention.
- Keep a configuration baseline: export tenant configuration regularly, or manage it as code, so eradication can diff against known good.
- Prepare break-glass accounts: two cloud-only accounts with phishing-resistant factors, monitored on every sign-in and tested quarterly.
- Minimise standing super administrators: use scoped admin roles and just-in-time elevation with approval.
- Harden the help desk: no MFA or password reset for privileged users without verified identity; this was the entry point for MGM and for the Storm-2949 Azure attack. See the Scattered Spider Threat Actor Profile.
- Treat IdP machine credentials as privileged NHIs: API tokens, SCIM tokens, sync service accounts and signing certificates need owners, vaulting and rotation procedures you can run under pressure.
- Measure readiness: time to export 90 days of IdP logs, number of standing top-level admins, percentage of admins on phishing-resistant factors, alert coverage for the section 1 triggers, and time to revoke all sessions for a list of users in a tabletop.
| Framework | Reference | Playbook sections |
|---|---|---|
| NIST CSF 2.0 | RS.MA-01, RS.MI-01, RS.MI-02, RS.CO-02, RS.CO-03, RC.RP-01 | 3 to 7 |
| NIST SP 800-53 Rev. 5 | IR-4, IR-6, IR-8, AC-2 | Whole playbook |
| MITRE ATT&CK v20 | T1566.004, T1078.004, T1556.006, T1484.002, T1098.003, T1539 | 1, 3, 4 |
Sources used for the platform steps: NIST: SP 800-61 Rev. 3; Microsoft Learn: Revoke user access in Microsoft Entra ID; Okta Security: Cross-Tenant Impersonation, Prevention and Detection; Google Workspace Admin Help: Sign a user out of their managed Google Account; CISA and FBI: Scattered Spider (AA23-320A).
This template is provided for guidance and must be adapted to your organisation. It is not legal advice. Related NHI Mgmt Group resources: Identity Provider and SSO Security Guide · Okta Security Hardening Guide · Entra ID Security Guide · Federation and Trust Relationships Guide · ITDR Guide