Join our Newsletter — 33% off our NHI Course
Home› Guides› How to investigate a compromised Okta account: System…
Guide Incident Response & Forensics

How to investigate a compromised Okta account: System Log queries, sessions and factor changes

PDF for newsletter subscribers · free to read online

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

When an Okta account is suspected of compromise, the System Log is your primary evidence source, and a disciplined sequence of queries tells you how the attacker got in, what they changed and what they reached. This guide walks an investigator through scoping the account, building a timeline from System Log events, examining sessions, reviewing authenticator (factor) changes, tracing downstream application and token access, and containing the account without destroying evidence. It is written for identity, security operations and incident response teams who already run Okta and need a repeatable method rather than a one-off hunt.

The same method applies whether the account belongs to a person, a shared administrator or an account that an integration relies on. Compromised human accounts in an identity provider are frequently the starting point for non-human identity abuse: an attacker who holds an administrator session can mint API tokens, register OAuth clients and alter policies that outlive the original intrusion. The investigation therefore has to follow the trail from the human session to every credential and configuration it touched.

This is an independent guide from NHI Mgmt Group, based on Okta's public documentation as of November 2026. It is not sponsored or reviewed by Okta. Product features change, so confirm settings against Okta's current documentation.

Key takeaways

  • Preserve the System Log first. Okta states that System Log data older than 90 days is not returned by the API, so export the relevant window to your SIEM or case store before anything else.
  • Anchor the timeline on user.session.start, user.authentication.auth_via_mfa and user.authentication.sso, then pivot on authenticationContext.externalSessionId to group everything a single session did.
  • Factor changes are the attacker's persistence. Review user.mfa.factor.activate, user.mfa.factor.deactivate, user.mfa.factor.reset_all and device.enrollment.create for the account and for anyone the account administered.
  • Push fatigue leaves a pattern: many system.push.send_factor_verify_push events, some user.mfa.okta_verify.deny_push, then a success.
  • If the account held admin rights, the scope widens to API tokens (system.api_token.create), role assignments (user.account.privilege.grant, iam.resourceset.bindings.add) and policy edits (policy.lifecycle.update, policy.rule.update).
  • Contain in an order that keeps evidence: export logs, clear sessions, reset factors and password, revoke tokens the account created, then review downstream applications.

When to open an investigation

Most Okta account investigations start from one of a small number of signals. Treat any of them as enough to open a case and begin preserving evidence, even before you are sure the account is compromised.

  • User report. Okta records user.account.report_suspicious_activity_by_enduser when a user reports suspicious activity. A user who says they received sign-in prompts they did not start is a strong lead.
  • ThreatInsight or blocked requests. security.threat.detected records a request from an IP that Okta ThreatInsight identifies as malicious, and security.request.blocked records a blocked security request. Successful events from the same IP shortly afterwards deserve attention.
  • Session anomalies. security.session.detect_client_roaming indicates a roaming session for the user, and user.session.context.change records a significant change to the context of an active session. Both can indicate session cookie theft.
  • Help desk resets. A password reset (user.account.reset_password) or a full factor reset (user.mfa.factor.reset_all) that the user did not request is a classic social engineering outcome. See the CISA and FBI Scattered Spider advisory listed in the references for context on help desk social engineering.
  • Unexpected administrative change. A new API token, admin role assignment or policy edit that nobody can explain often reveals an account that was compromised days earlier.

Record the trigger, the time you first saw it and the Okta user ID (the 00u... identifier). Everything that follows is keyed on that ID rather than the login name, because login names can be changed.

Preserve the System Log before you act

The System Log API provides near real-time, read-only access to the organisation's System Log through the /api/v1/logs endpoint. Okta's query reference sets out constraints that shape how you preserve evidence:

  • Data older than 90 days is not returned, even if the query succeeds, and since cannot be more than 180 days before the current day. If your investigation needs older data, it must come from a SIEM or archive that was already collecting it.
  • For a fixed window, use since and until together. These are bounded requests and return events in published order, although some events may arrive late.
  • Follow the next links to paginate. Okta warns against paginating manually by moving since and until, because that can skip or duplicate events. The after parameter is system generated and should not be crafted by hand.
  • Individual queries time out after 30 seconds and rate limit violations return error code E0000047, so large exports should be scripted with back-off.

Export two data sets as soon as the case opens: every event where the user is the actor, and every event where the user is the target. Okta's filter syntax supports both directly:

  • actor.id eq "00u..." for actions the account performed.
  • target.id eq "00u..." for actions performed on the account, such as resets and factor changes by an administrator or the help desk.

Store the raw JSON with a hash and an export timestamp. Do not rely on the Admin Console view alone; it is useful for browsing but it is not an evidence record. If you already forward the System Log to a SIEM, check the forwarding has no gaps for the investigation window before trusting it. The Okta System Log Detection Guide covers collection without gaps in more depth.

Build the authentication timeline

With the export in hand, build a timeline of how the account authenticated. Start with three event types:

Event typeOkta descriptionWhat to look for
user.session.startAttempt to authenticate a user or establish an Okta session.New IP addresses, countries, autonomous systems or user agents; failures followed by a success.
user.authentication.auth_via_mfaAuthentication of user via MFA (in Classic orgs, second factor verifications only).Which factor was used and whether it matches the user's normal pattern.
user.authentication.verifyA successful authentication flow state in Identity Engine, or session policy validation in Classic Engine.Successful verifications from unfamiliar clients.

A useful first query is the one Okta itself uses as an example: eventType eq "user.session.start" and outcome.result eq "FAILURE", scoped to the user. A run of failures from one address followed by a success from the same address points to password guessing or credential stuffing. A single success from a new location with no preceding failures points to a phished or reused password, or a stolen session.

Then look for MFA fatigue. Okta records system.push.send_factor_verify_push each time a push notification is sent to a device and user.mfa.okta_verify.deny_push when the user rejects a push. A burst of pushes with denials, then an approval, matches MITRE ATT&CK technique T1621 (Multi-Factor Authentication Request Generation). Also check user.mfa.attempt_bypass, which Okta describes as an attempt to bypass a factor.

For each successful sign-in, note the client IP from client.ipAddress, the user agent and the session identifier. You can pivot quickly on an attacker address with a filter such as client.ipAddress eq "203.0.113.10" across the whole organisation, which tells you whether the same infrastructure touched other accounts.

Follow each session

Sessions are where the investigation becomes precise. Okta's query reference explains that authenticationContext.externalSessionId links events in the same user session, authenticationContext.rootSessionId groups related sessions, and transaction.id links events in the same operation.

For each suspicious user.session.start, take the external session ID and pull every event carrying it. That gives you a per-session story: which applications were opened (user.authentication.sso, recorded for each app sign-in step processed by Okta), whether the Admin Console was opened (user.session.access_admin_app), and what changes were made. Sort the result by published time and annotate each step.

Look specifically for these session patterns:

  • Session without a matching sign-in. Activity under a session ID whose start is absent or comes from a different client may indicate a replayed session cookie, which maps to ATT&CK T1539 (Steal Web Session Cookie).
  • Roaming. security.session.detect_client_roaming or user.session.context.change in the middle of a session suggests the session moved to a different client or network.
  • Impersonation. user.session.impersonation.initiate records the start of an impersonation session. Confirm every instance was an authorised support action.
  • Session ends. user.session.end records the end of a session and user.session.clear records clearing all active sessions for a user. An attacker who clears the legitimate user's sessions may be trying to lock them out.

The output of this step is a list of attacker sessions with start time, end time (or "still active"), client details and the applications each one reached. That list drives both containment and scoping.

Review factor and password changes

Attackers who reach an Okta account usually try to make their access durable by enrolling their own authenticator or removing the user's. ATT&CK tracks this as T1556.006 (Modify Authentication Process: Multi-Factor Authentication). Query the user as target for these event types:

Event typeOkta description
user.mfa.factor.activateActivate factor or authenticator enrollment method for user.
user.mfa.factor.deactivateReset factor or authenticator enrollment method for user.
user.mfa.factor.reset_allReset all factors or authenticator enrollments for user.
user.mfa.factor.suspendSuspend factor or authenticator enrollment method for user.
device.enrollment.createEnroll new device, for example when a new device is registered for Okta Verify.
user.account.update_passwordUser update password for Okta.
user.account.reset_passwordUser's Okta password has been reset.

For each event, answer three questions. Who was the actor: the user, an administrator, the help desk or an automated flow? Did it happen inside an attacker session identified in the previous step? And does the resulting authenticator still exist? A new Okta Verify enrolment on an unfamiliar device, created minutes after a help desk reset, is one of the most common findings in these investigations.

Where the actor was an administrator or help desk agent, pull that actor's own events for the same window. If the reset followed a phone call, compare the ticket and call record with the event time. A help desk process that reset factors without strong verification is a control failure to record in the case, whatever else you find.

Scope what the account could reach

Once you know which sessions belonged to the attacker, establish what they could reach and what they changed. Split the work into end user scope and administrative scope.

End user scope

Every user.authentication.sso event inside an attacker session is an application the attacker signed in to. Okta's evidence stops at the sign-in, so each of those applications now needs its own log review: mailbox access, file downloads, repository clones, cloud console activity. Also check app.oauth2.as.token.grant (OAuth2 token request) for tokens issued by Okta authorisation servers during attacker sessions, since those tokens may remain valid after the Okta session ends. Use the IP addresses and times from your timeline as search keys in each downstream system. The guide to detecting use of a stolen OAuth refresh token covers that follow-on hunt.

Administrative scope

If the account held any admin role, or gained one during the incident, look for changes that create new identities or credentials. These are the actions that turn a single compromised user into a long-lived foothold, and many of them create non-human identities that survive a password reset:

  • system.api_token.create: a new unscoped API token. Treat any token created in an attacker session as attacker controlled and revoke it. Confirm revocation with system.api_token.revoke.
  • user.account.privilege.grant (a user's admin privileges changed), group.privilege.grant (a group's admin privilege granted) and iam.resourceset.bindings.add (admin role assignment created).
  • policy.lifecycle.update and policy.rule.update, which can weaken sign-on or MFA requirements. The policy.lifecycle.update event carries change details, so record before and after values.
  • group.user_membership.add and application.user_membership.add, which can quietly grant access to sensitive applications.
  • user.lifecycle.activate for any new accounts, and changes to other users' factors made by the compromised admin.

A broad sweep with actor.id eq "00u..." and an eventType sw "system.", sw "policy." or sw "iam." filter catches most of these. For a fuller method on token and service app review, see How to audit Okta API tokens and service apps.

Contain without losing evidence

Containment should follow evidence preservation, but not by long. Once the export is safe, act in this order:

  1. Clear the user's sessions. End all active sessions so stolen cookies stop working, and confirm a user.session.clear event appears. If downstream applications keep their own sessions, end those too, because clearing the Okta session does not necessarily log the user out of every app.
  2. Remove attacker authenticators. Deactivate any factor or device enrolment you attributed to the attacker. If you cannot tell which enrolments are legitimate, reset all factors and re-enrol the user through a verified, in-person or video channel.
  3. Reset the password through a channel the attacker does not control.
  4. Suspend if needed. If the account is still under attack, or you cannot complete re-verification quickly, suspend it (user.lifecycle.suspend) rather than deactivating it, so the account and its history remain intact.
  5. Revoke what the attacker created. API tokens, admin role assignments, group memberships, OAuth tokens and policy changes made in attacker sessions all need reversal, each confirmed by its own log event.
  6. Block attacker infrastructure where your network zones or policies allow, and add the IPs to your watch list for the rest of the organisation.

After each step, re-query the System Log to confirm the expected event exists. An action you believe you took but cannot see in the log is not evidence of containment.

Close the case and harden

An Okta account investigation is complete when you can answer, with log evidence: how the attacker first authenticated, every session they held, every factor, credential and configuration they created or changed, every application they reached, and the confirmation that each of those has been reversed. Write the timeline into the case record with event UUIDs so that a reviewer can reproduce it.

Then fix the control that failed. Common improvements include phishing resistant authenticators for administrators, stronger help desk verification before factor resets, number matching or similar push protections, network zones for admin access, and alerting on the event types in this guide. The Okta Security Hardening Guide sets out those configuration changes in detail. NIST SP 800-61 Rev. 3 frames these lessons learned as part of continuous risk management rather than a closing formality.

Common failure patterns

  • Acting before exporting. Teams reset the account first and only later discover the 90 day window has cut off the initial access events, or that a busy organisation's log has rotated past the useful range in their tooling.
  • Searching by login name. Login names change. Searching on the user ID catches events from before and after a rename.
  • Stopping at the password reset. A reset does nothing about an attacker's enrolled authenticator, API tokens they created, or OAuth tokens issued to applications.
  • Ignoring the target view. Many decisive events, such as a help desk factor reset, are recorded with the user as target and a different actor. Investigators who query only actor.id miss them.
  • Treating Okta as the whole story. Okta shows the sign-in to each application but not what happened inside it. Every application reached in an attacker session needs its own review.
  • Manual pagination. Moving since and until by hand instead of following next links can silently skip or duplicate events, which undermines the timeline.

Practitioner checklist

  • Record the Okta user ID, trigger and first seen time; open a case.
  • Export System Log events with the user as actor and as target for the full available window, hashed and timestamped.
  • Build the sign-in timeline from user.session.start, user.authentication.auth_via_mfa and user.authentication.verify.
  • Check for push fatigue: system.push.send_factor_verify_push, user.mfa.okta_verify.deny_push, user.mfa.attempt_bypass.
  • Group activity by authenticationContext.externalSessionId and list attacker sessions.
  • Review every factor, device enrolment and password event and its actor.
  • List applications reached via user.authentication.sso and tokens issued via app.oauth2.as.token.grant; hand each to its owner for review.
  • For admin accounts, sweep for API tokens, role grants, policy edits and membership changes.
  • Contain: clear sessions, remove attacker factors, reset password, suspend if needed, revoke created credentials, confirm each in the log.
  • Pivot on attacker IPs across the organisation.
  • Document the root cause and the hardening change that closes it.

Standards and references

Related NHI Mgmt Group resources: Okta System Log Detection Guide · Okta Security Hardening Guide · How to audit Okta API tokens and service apps · How to detect use of a stolen OAuth refresh token

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.