Detection rules › Splunk
O365 Tenant Wide Admin Consent Granted
The following analytic identifies instances where admin consent is granted to an application within an Azure AD and Office 365 tenant. It leverages O365 audit logs, specifically events related to the admin consent action within the AzureActiveDirectory workload. This activity is significant because admin consent allows applications to access data across the entire tenant, potentially exposing vast amounts of organizational data. If confirmed malicious, an attacker could gain extensive and persistent access to organizational data, leading to data exfiltration, espionage, further malicious activities, and potential compliance violations.
Known false positives
- Legitimate applications may be granted tenant wide consent, filter as needed.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation |
Telemetry coverage
| Platform | Record / event type |
|---|---|
| Microsoft 365 | Consent to application. |
Rules detecting the same action
These rules filter on the same operation.
Rule body
name: O365 Tenant Wide Admin Consent Granted
id: 50eaabf8-5180-4e86-bfb2-011472c359fc
version: 10
creation_date: '2023-12-06'
modification_date: '2026-05-13'
author: Mauricio Velazco, Splunk
status: production
type: TTP
description: The following analytic identifies instances where admin consent is granted to an application within an Azure AD and Office 365 tenant. It leverages O365 audit logs, specifically events related to the admin consent action within the AzureActiveDirectory workload. This activity is significant because admin consent allows applications to access data across the entire tenant, potentially exposing vast amounts of organizational data. If confirmed malicious, an attacker could gain extensive and persistent access to organizational data, leading to data exfiltration, espionage, further malicious activities, and potential compliance violations.
data_source:
- O365 Consent to application.
search: "`o365_management_activity` Operation=\"Consent to application.\" | eval new_field=mvindex('ModifiedProperties{}.NewValue', 4) | rex field=new_field \"ConsentType: (?<ConsentType>[^\\,]+)\" | rex field=new_field \"Scope: (?<Scope>[^\\,]+)\" | search ConsentType = \"AllPrincipals\" | fillnull | stats count min(_time) as firstTime max(_time) as lastTime by user, object, ObjectId, ConsentType, Scope, dest, vendor_account, vendor_product, signature, src | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `o365_tenant_wide_admin_consent_granted_filter`"
how_to_implement: You must install the Splunk Microsoft Office 365 Add-on and ingest Office 365 management activity events.
known_false_positives: Legitimate applications may be granted tenant wide consent, filter as needed.
references:
- https://attack.mitre.org/techniques/T1098/003/
- https://www.mandiant.com/resources/blog/remediation-and-hardening-strategies-for-microsoft-365-to-defend-against-unc2452
- https://learn.microsoft.com/en-us/security/operations/incident-response-playbook-app-consent
- https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/grant-admin-consent?pivots=portal
- https://microsoft.github.io/Azure-Threat-Research-Matrix/Persistence/AZT501/AZT501-2/
finding:
title: The $object$ application registration was granted tenant wide admin consent.
entity:
field: user
type: user
score: 50
analytic_story:
- Office 365 Persistence Mechanisms
- NOBELIUM Group
asset_type: O365 Tenant
mitre_attack_id:
- T1098.003
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: cloud
security_domain: identity
Stages and Predicates
Stage 1: search
`o365_management_activity` Operation="Consent to application."
Stage 2: eval
| eval new_field=mvindex('ModifiedProperties{}.NewValue', 4)
Stage 3: rex
| rex field=new_field "ConsentType: (?<ConsentType>[^\,]+)"
Stage 4: rex
| rex field=new_field "Scope: (?<Scope>[^\,]+)"
Stage 5: search
| search ConsentType = "AllPrincipals"
Stage 6: fillnull
| fillnull
Stage 7: stats
| stats count min(_time) as firstTime max(_time) as lastTime by user, object, ObjectId, ConsentType, Scope, dest, vendor_account, vendor_product, signature, src
Stage 8: search
| `security_content_ctime(firstTime)`
Stage 9: search
| `security_content_ctime(lastTime)`
Stage 10: search
| `o365_tenant_wide_admin_consent_granted_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ConsentType | eq |
| field:"ConsentType" kind:eq |
Operation | eq |
| field:"Operation" kind:eq |
sourcetype | eq |
| field:"sourcetype" kind:eq value:"o365:management:activity" |