Okta Sign-In Events via Third-Party IdP

Last updated 5 days ago on 2026-01-09
Created 2 years ago on 2023-11-06

About

Detects sign-in events where authentication is carried out via a third-party Identity Provider (IdP) that has not been seen before. Adversaries may add an unauthorized IdP to an Okta tenant to gain persistent access. This rule uses New Terms detection to only alert when a previously unseen IdP is used for authentication, reducing noise from legitimate federated identity providers while highlighting potentially rogue IdP additions.
Tags
Domain: IdentityUse Case: Identity and Access AuditTactic: Initial AccessData Source: OktaLanguage: kuery
Severity
medium
Risk Score
47
MITRE ATT&CK™

Initial Access (TA0001)(external, opens in a new tab or window)

License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
New Terms Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-okta.system-*
Related Integrations

okta(external, opens in a new tab or window)

Query
text code block:
event.dataset: "okta.system" and okta.authentication_context.issuer.id: (* and not "Okta") and ( event.action: ( "user.authentication.auth_via_IDP" or "user.authentication.auth_via_inbound_SAML" or "user.authentication.auth_via_social" ) or ( event.action: "user.authentication.auth_via_IDP" and okta.outcome.result: "FAILURE" and okta.outcome.reason: ( "A SAML assert with the same ID has already been processed by Okta for a previous request" or "Unable to match transformed username" or "Unable to resolve IdP endpoint" or "Unable to validate SAML Response" or "Unable to validate incoming SAML Assertion" ) ) )

Install detection rules in Elastic Security

Detect Okta Sign-In Events via Third-Party IdP in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).