Detection rules › Splunk
Azure AD Tenant Wide Admin Consent Granted
The following analytic identifies instances where admin consent is granted to an application within an Azure AD tenant. It leverages Azure AD audit logs, specifically events related to the admin consent action within the ApplicationManagement category. 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 sensitive 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 |
|---|---|
| Azure | Consent to application |
Rules detecting the same action
These rules filter on the same operation.
- [Entra ID] Application Assigned Administrator Permissions Immediately After Obtaining Role Management Permissions (Kusto)
- [Entra ID] Application Granted Administrative Permission to Assign Microsoft Entra ID Roles (Kusto)
- Added Credentials to Existing Application (Sigma)
- Added Owner To Application (Sigma)
- Admin promotion after Role Management Application Permission Grant (Kusto)
- App Granted Microsoft Permissions (Sigma)
- App Granted Privileged Delegated Or App Permissions (Sigma)
- Application AppID Uri Configuration Changes (Sigma)
Rule body
name: Azure AD Tenant Wide Admin Consent Granted
id: dc02c0ee-6ac0-4c7f-87ba-8ce43a4e4418
version: 11
creation_date: '2023-11-16'
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 tenant. It leverages Azure AD audit logs, specifically events related to the admin consent action within the ApplicationManagement category. 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 sensitive data, leading to data exfiltration, espionage, further malicious activities, and potential compliance violations.
data_source:
- Azure Active Directory Consent to application
search: "`azure_monitor_aad` operationName=\"Consent to application\" | eval new_field=mvindex('properties.targetResources{}.modifiedProperties{}.newValue',4) | rename properties.* as * | rex field=new_field \"ConsentType:(?<ConsentType> [^\\,]+)\" | rex field=new_field \"Scope:(?<Scope> [^\\,]+)\" | search ConsentType = \"*AllPrincipals*\" | rename userAgent as user_agent | fillnull | stats count min(_time) as firstTime max(_time) as lastTime by dest user src vendor_account vendor_product ConsentType Scope signature | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `azure_ad_tenant_wide_admin_consent_granted_filter`"
how_to_implement: You must install the latest version of Splunk Add-on for Microsoft Cloud Services from Splunkbase (https://splunkbase.splunk.com/app/3110/#/details). You must be ingesting Azure Active Directory events into your Splunk environment through an EventHub. This analytic was written to be used with the azure:monitor:aad sourcetype leveraging the Auditlogs log category.
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: Administrator $user$ consented an OAuth application for the tenant.
entity:
field: user
type: user
score: 50
analytic_story:
- Azure Active Directory Persistence
- NOBELIUM Group
asset_type: Azure 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
`azure_monitor_aad` operationName="Consent to application"
Stage 2: eval
| eval new_field=mvindex('properties.targetResources{}.modifiedProperties{}.newValue',4)
Stage 3: rename
| rename properties.* as *
Stage 4: rex
| rex field=new_field "ConsentType:(?<ConsentType> [^\,]+)"
Stage 5: rex
| rex field=new_field "Scope:(?<Scope> [^\,]+)"
Stage 6: search
| search ConsentType = "*AllPrincipals*"
Stage 7: rename
| rename userAgent as user_agent
Stage 8: fillnull
| fillnull
Stage 9: stats
| stats count min(_time) as firstTime max(_time) as lastTime by dest user src vendor_account vendor_product ConsentType Scope signature
Stage 10: search
| `security_content_ctime(firstTime)`
Stage 11: search
| `security_content_ctime(lastTime)`
Stage 12: search
| `azure_ad_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 |
operationName | eq |
| field:"operationName" kind:eq |
sourcetype | eq |
| field:"sourcetype" kind:eq value:"azure:monitor:aad" |