Entra ID App Permission Grant by Rare User
Identifies the first time, within a lookback window, a user grants application permissions in Entra ID ("Add app role assignment to service principal" or "Add delegated permission grant"). Adversaries abuse application role assignments and delegated permission grants to obtain durable, token-based access to tenant data without requiring interactive consent. This is a New Terms rule keyed on the granting user; known cloud-provider egress networks are excluded.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2026/11/12"
3integration = ["azure"]
4maturity = "production"
5updated_date = "2026/11/12"
6
7[rule]
8author = ["Elastic"]
9description = """
10Identifies the first time, within a lookback window, a user grants application permissions in Entra ID ("Add app role
11assignment to service principal" or "Add delegated permission grant"). Adversaries abuse application role assignments
12and delegated permission grants to obtain durable, token-based access to tenant data without requiring interactive
13consent. This is a New Terms rule keyed on the granting user; known cloud-provider egress networks are excluded.
14"""
15false_positives = [
16 """
17 Administrators grant application and delegated permissions as part of legitimate onboarding and integration work.
18 The New Terms logic baselines known administrators; a newly seen user granting permissions, especially from an
19 unusual network, warrants review.
20 """,
21]
22from = "now-6m"
23index = ["logs-azure.auditlogs-*"]
24language = "kuery"
25license = "Elastic License v2"
26name = "Entra ID App Permission Grant by Rare User"
27note = """## Triage and analysis
28
29### Investigating Entra ID App Permission Grant by Rare User
30
31Direct application role assignments (`Add app role assignment to service principal`) and OAuth delegated permission grants (`Add delegated permission grant`) hand service principals standing access to tenant resources without requiring an interactive `"Consent to application"` flow. Adversaries with privileged roles or application ownership abuse these operations for persistence and data access.
32
33### Possible investigation steps
34
35- Confirm the initiating user (`azure.auditlogs.properties.initiated_by.user.userPrincipalName`) and whether the permission grant (`event.action`) was expected.
36- Identify the target service principal or application (`azure.auditlogs.properties.target_resources.0.display_name`) and the permissions, roles, or scopes granted (`modified_properties`).
37- Review `source.as.organization.name` and `source.ip`; permission grants from an unusual or residential network warrant scrutiny.
38- Determine whether the grant gives tenant-wide access (`PrincipalId` / `ConsentType: AllPrincipals` or high-privilege Graph app roles) and whether the app is first-party or third-party.
39
40### False positive analysis
41
42- Legitimate admin onboarding/integration permission grants; add exceptions by initiating UPN or known application/service-principal IDs.
43
44### Response and remediation
45
46- If unauthorized, revoke the app role assignment or delegated permission grant and service-principal credentials, review data accessed via the app, and rotate the initiating user's credentials.
47"""
48references = [
49 "https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/manage-consent-requests",
50 "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1098/T1098.md",
51]
52risk_score = 47
53rule_id = "84234d81-a716-4641-9cce-802a5e6c2ca1"
54severity = "medium"
55tags = [
56 "Domain: Cloud",
57 "Data Source: Azure",
58 "Data Source: Microsoft Entra ID",
59 "Data Source: Microsoft Entra ID Audit Logs",
60 "Domain: Identity",
61 "Platform: Azure",
62 "Tactic: Persistence",
63 "Rule Type: New Terms",
64 "Resources: Investigation Guide",
65]
66timestamp_override = "event.ingested"
67type = "new_terms"
68
69query = '''
70data_stream.dataset: "azure.auditlogs"
71 and event.action: ("Add app role assignment to service principal" or "Add delegated permission grant")
72 and event.outcome: "success"
73 and not source.as.organization.name: (
74 "Google LLC" or "Amazon.com, Inc." or "Microsoft Corporation" or "GOOGLE-CLOUD-PLATFORM"
75 or "MICROSOFT-CORP-MSN-AS-BLOCK" or "AMAZON-AES" or "AMAZON-02"
76 )
77'''
78
79
80[[rule.threat]]
81framework = "MITRE ATT&CK"
82[[rule.threat.technique]]
83id = "T1098"
84name = "Account Manipulation"
85reference = "https://attack.mitre.org/techniques/T1098/"
86[[rule.threat.technique.subtechnique]]
87id = "T1098.003"
88name = "Additional Cloud Roles"
89reference = "https://attack.mitre.org/techniques/T1098/003/"
90
91
92[rule.threat.tactic]
93id = "TA0003"
94name = "Persistence"
95reference = "https://attack.mitre.org/tactics/TA0003/"
96
97[rule.investigation_fields]
98field_names = [
99 "@timestamp",
100 "azure.auditlogs.properties.initiated_by.user.userPrincipalName",
101 "azure.auditlogs.properties.target_resources.0.display_name",
102 "event.action",
103 "event.outcome",
104 "source.ip",
105 "source.as.organization.name",
106 "cloud.account.id",
107]
108
109[rule.new_terms]
110field = "new_terms_fields"
111value = ["cloud.account.id", "azure.auditlogs.properties.initiated_by.user.userPrincipalName"]
112[[rule.new_terms.history_window_start]]
113field = "history_window_start"
114value = "now-10d"
Triage and analysis
Investigating Entra ID App Permission Grant by Rare User
Direct application role assignments (Add app role assignment to service principal) and OAuth delegated permission grants (Add delegated permission grant) hand service principals standing access to tenant resources without requiring an interactive "Consent to application" flow. Adversaries with privileged roles or application ownership abuse these operations for persistence and data access.
Possible investigation steps
- Confirm the initiating user (
azure.auditlogs.properties.initiated_by.user.userPrincipalName) and whether the permission grant (event.action) was expected. - Identify the target service principal or application (
azure.auditlogs.properties.target_resources.0.display_name) and the permissions, roles, or scopes granted (modified_properties). - Review
source.as.organization.nameandsource.ip; permission grants from an unusual or residential network warrant scrutiny. - Determine whether the grant gives tenant-wide access (
PrincipalId/ConsentType: AllPrincipalsor high-privilege Graph app roles) and whether the app is first-party or third-party.
False positive analysis
- Legitimate admin onboarding/integration permission grants; add exceptions by initiating UPN or known application/service-principal IDs.
Response and remediation
- If unauthorized, revoke the app role assignment or delegated permission grant and service-principal credentials, review data accessed via the app, and rotate the initiating user's credentials.
References
Related rules
- Entra ID User Created or Deleted by Unusual UPN
- Entra ID Service Principal Credentials Created by Unusual User
- Entra ID Conditional Access Policy (CAP) Modified
- Entra ID Windows Hello for Business Credential Registered
- Entra ID Password Reset of Another User