Skip to content

Identity Incident Response

github-actions[bot] edited this page Nov 29, 2026 · 1 revision

Last reviewed: 2026-11-28 (procedure assembled from provider documentation; not exercised against a real tenant, account or organization)

Caution

Authorized use only. Containment actions in this playbook disable accounts, revoke sessions, remove app access and change trust settings. Use them only in environments you are authorized to respond in, under an incident record, and coordinate with service owners before acting on workload identities. See LEGAL.md.

Prerequisites: Cloud identity index ยท Identity log sources ยท Incident Response index

๐ŸŽฏ Purpose

A cloud identity incident playbook for Microsoft Entra ID, AWS and Google Cloud / Workspace: compromised users, compromised workload credentials, malicious app consent and federation tampering.

โš™๏ธ Function

Walks through triage, containment, eradication, recovery and lessons learned. Each step links to the detailed, source-cited procedure in the other guides of this section and to the identity detections that can raise the first alert.

๐Ÿ† Goal

End the attacker's access across every provider the identity touches, remove the persistence they added, and restore service with evidence preserved.

๐Ÿ“‹ When To Use

  • An identity detection fires (role added, consent granted, key created, emergency account used, unexpected federated subject)
  • A user reports MFA prompts they did not start, or approving an app they did not expect
  • A provider risk signal (Entra ID Protection, Workspace suspicious_login) marks an account

๐Ÿงญ Scope Of This Playbook

Incident type Typical first signal Main guide
Compromised user (password, session or token) Risky sign-in, impossible-travel style alert, user report Token theft & session revocation
Compromised workload credential New key or secret, API calls from an unknown network Token theft & session revocation
Illicit OAuth consent "Consent to application", Workspace authorize OAuth consent & app investigation
Privilege escalation in the IdP "Add member to role", setIamPolicy, CreateAccountAssignment Identity lifecycle & privileged access
Federation or trust tampering "Set federation settings on domain", new OIDC trust Token theft & session revocation

For on-premises and endpoint-side unauthorized access (Windows event logs, SSH, brute force), use the unauthorized access playbook alongside this one.

1๏ธโƒฃ Triage

  1. Confirm the alert against the raw record. Open the event in the provider log (Entra AuditLogs/SigninLogs, CloudTrail, Cloud Audit Logs or Workspace reports), not only the SIEM summary.
  2. Identify the identity and its reach. Which human or workload; which tenants, AWS accounts and Google Cloud projects it can reach through federation, Identity Center assignments or service account impersonation.
  3. Check log availability now. Retention may be short (Entra Free 7 days; CloudTrail event history 90 days per Region; Workspace 6 months). Export what you need before it ages out; see identity log sources.
  4. Establish a timeline from the first suspicious event: sign-ins (including non-interactive and service principal sign-ins), MFA method changes, consent grants, role and policy changes, new credentials.
  5. Classify severity. Treat any privileged role, emergency-access account, federation change or tenant-wide consent (IsAdminConsent True) as critical.

Correlate with endpoint and email evidence through the alert-to-case correlation guide.

2๏ธโƒฃ Contain

Act in this order so the attacker cannot re-enter between steps. Details and limits are in token theft & session revocation.

Step Microsoft Entra ID AWS Google Cloud / Workspace
Block new sign-ins Update-MgUser -UserId <id> -AccountEnabled:$false (hybrid: Disable-ADAccount on-premises first) Identity Center: add user ID to the deny SCP; IAM user: remove console password Suspend the user
End sessions Revoke-MgUserSignInSession -UserId <id>; disable devices Role: Revoke active sessions (AWSRevokeOlderSessions); Identity Center: delete the active session users.signOut
Disable workload credentials Remove the service principal secret or certificate; disable a malicious app (do not delete) aws iam update-access-key ... --status Inactive gcloud iam service-accounts keys disable; disable the service account to revoke issued short-lived credentials
Remove app access Remove-MgOauth2PermissionGrant, Remove-MgServicePrincipalAppRoleAssignment Review OIDC/SAML trusts the attacker added tokens.delete per app

Warning

Every revocation has a residual window: Entra notes a delay of a few minutes for session revocation and does not recall issued access tokens; AWS denies sessions issued before a point about 30 seconds ahead; disabling a Google service account key does not revoke short-lived credentials already issued from it. Keep monitoring through that window.

3๏ธโƒฃ Eradicate

Remove everything the attacker may have added. Review the full incident window, not just the first alert.

  • Authentication methods: MFA methods, passkeys or phone numbers registered during the window; Workspace 2sv_enroll, passkey_enrolled, recovery_phone_edit, recovery_email_edit.
  • Credentials on apps and roles: "Add service principal credentials", "Update application - Certificates and secrets management", "Add owner to application"; CloudTrail CreateAccessKey (including for other users); CreateServiceAccountKey / UploadServiceAccountKey.
  • Privilege: "Add member to role" and PIM eligible assignments; IAM policy attachments (AttachUserPolicy and similar); Identity Center CreateAccountAssignment and permission-set changes; setIamPolicy on projects, folders and organizations.
  • Policy weakening: Conditional Access policy updates or deletions, named-location changes, security defaults changes.
  • Trust changes: "Set federation settings on domain", "Set domain authentication", "Add unverified domain"; new IAM OIDC providers or role trust policies; Workload Identity Federation pool changes (WorkloadIdentityPools.SetIamPolicy). If a SAML token-signing key may be exposed, follow the two-certificate emergency rotation.
  • Mail and data persistence: for Microsoft 365, mailbox rules and forwarding (see the unauthorized access playbook).

4๏ธโƒฃ Recover

  1. Reset the user's password and require re-registration with a phishing-resistant method; see phishing-resistant authentication.
  2. Re-enable the account only after eradication is complete, and remove the user ID from the AWS deny SCP no sooner than 12 hours after it was added.
  3. Issue new workload credentials through federation instead of new long-lived keys where possible; see workload identity federation.
  4. Rotate any secrets the compromised identity could read (vaults, parameter stores, CI variables).
  5. Watch the identity closely for at least the longest token or session lifetime in play.

5๏ธโƒฃ Lessons Learned

  • Which detection fired first, and how long after the initial access? Add or tune a rule for the earliest event you found; the detections show the expected structure and test evidence.
  • Were logs missing or expired? Fix diagnostic settings, trails, sinks and retention.
  • Did a control fail open (Conditional Access exclusion, broad OIDC sub wildcard, user consent allowed for all apps, long-lived keys)? Record the change and the owner.
  • Did break-glass work if it was needed? Schedule the next drill; see periodic break-glass testing.
  • Update this playbook and the unauthorized access playbook with anything that slowed the response.

See also


Related Files


โฌ…๏ธ Cloud Identity index | Master Index | ๐ŸŽฏ Role Navigation | Legal Notice


๐Ÿ“„ Source: Cloud/Identity/identity-incident-response.md | โœ๏ธ Suggest an edit | โฌ…๏ธ Back to Cloud

Clone this wiki locally