Detection rules › Splunk
O365 Excessive SSO logon errors
The following analytic detects accounts experiencing a high number of Single Sign-On (SSO) logon errors. It leverages data from the o365_management_activity dataset, focusing on failed user login attempts with SSO errors. This activity is significant as it may indicate brute-force attempts or the hijacking/reuse of SSO tokens. If confirmed malicious, attackers could potentially gain unauthorized access to user accounts, leading to data breaches, privilege escalation, or further lateral movement within the organization.
Known false positives
- Logon errors may not be malicious in nature however it may indicate attempts to reuse a token or password obtained via credential access attack.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Defense Impairment | |
| Credential Access |
Telemetry coverage
| Platform | Record / event type |
|---|---|
| Microsoft 365 | UserLoginFailed |
Rules detecting the same action
These rules filter on the same operation.
- High Number of Login Failures from a single source (Splunk)
- M365 Identity User Account Lockouts (Elastic)
- M365 Identity User Brute Force Attempted (Elastic)
- O365 High Number Of Failed Authentications for User (Splunk)
- O365 Multi-Source Failed Authentications Spike (Splunk)
- O365 Multiple AppIDs and UserAgents Authentication Spike (Splunk)
- O365 Multiple Failed MFA Requests For User (Splunk)
- O365 Multiple Users Failing To Authenticate From Ip (Splunk)
Rule body
name: O365 Excessive SSO logon errors
id: 8158ccc4-6038-11eb-ae93-0242ac130002
version: 12
creation_date: '2021-01-26'
modification_date: '2026-05-13'
author: Rod Soto, Splunk
status: production
type: Anomaly
description: The following analytic detects accounts experiencing a high number of Single Sign-On (SSO) logon errors. It leverages data from the `o365_management_activity` dataset, focusing on failed user login attempts with SSO errors. This activity is significant as it may indicate brute-force attempts or the hijacking/reuse of SSO tokens. If confirmed malicious, attackers could potentially gain unauthorized access to user accounts, leading to data breaches, privilege escalation, or further lateral movement within the organization.
data_source:
- O365 UserLoginFailed
search: |-
`o365_management_activity` Workload=AzureActiveDirectory LogonError=*Sso* Operation=UserLoginFailed
| stats count min(_time) as firstTime max(_time) as lastTime values(user) as user
BY src vendor_account vendor_product
dest signature user_agent
| where count >= 5
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `o365_excessive_sso_logon_errors_filter`
how_to_implement: You must install splunk Microsoft Office 365 add-on. This search works with o365:management:activity
known_false_positives: Logon errors may not be malicious in nature however it may indicate attempts to reuse a token or password obtained via credential access attack.
references:
- https://stealthbits.com/blog/bypassing-mfa-with-pass-the-cookie/
intermediate_findings:
entities:
- field: user
type: user
score: 20
message: Excessive number of SSO logon errors from $src$ using UserAgent $user_agent$.
threat_objects:
- field: src
type: ip_address
analytic_story:
- Office 365 Account Takeover
- Cloud Federated Credential Abuse
asset_type: O365 Tenant
mitre_attack_id:
- T1556
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: cloud
security_domain: threat
Stages and Predicates
Stage 1: search
`o365_management_activity` Workload=AzureActiveDirectory LogonError=*Sso* Operation=UserLoginFailed
Stage 2: stats
| stats count min(_time) as firstTime max(_time) as lastTime values(user) as user
BY src vendor_account vendor_product
dest signature user_agent
Stage 3: where
| where count >= 5
Stage 4: search
| `security_content_ctime(firstTime)`
Stage 5: search
| `security_content_ctime(lastTime)`
Stage 6: search
| `o365_excessive_sso_logon_errors_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
LogonError | eq |
| field:"LogonError" kind:eq value:"*Sso*" |
Operation | eq |
| field:"Operation" kind:eq value:"UserLoginFailed" |
Workload | eq |
| field:"Workload" kind:eq value:"AzureActiveDirectory" |
count | ge |
| field:"count" kind:ge value:"5" |
sourcetype | eq |
| field:"sourcetype" kind:eq value:"o365:management:activity" |