Azure App/Service Principal Assigned to Entra ID or Azure RBAC Roles (Audit Logs)
Finds Azure role assignments where an app/service principal is granted, eligible, or scoped membership via audit log messages.
- Product
- azure
- Service
- auditlogs
- Author
- Bailey Bercik '@baileybercik', Mark Morowczynski '@markmorow' (SigmaHQ), DRL 1.1
- Published
- 2022-07-19
- Updated
- 2026-07-31
ATT&CK techniques
Persistence → Priv EscRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags events where a service principal (application identity) is added as a member, eligible member, or scoped member to a role. Assigning privileged Entra ID or Azure RBAC permissions to an application can enable persistent access and privilege escalation without interactive user activity. It relies on Azure audit log messages indicating role assignment actions and targets service principals.
Reporting behind it
Changelog
v5- v5Candidate ingested via manual entry.2026-07-31
- v4Candidate ingested via manual entry.2026-07-31
- v3Candidate ingested via manual entry.2026-07-31
- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: Azure App/Service Principal Assigned to Entra ID or Azure RBAC Roles (Audit Logs)
id: 8a809790-eae9-4330-bf2a-c8fdd2a26fe5
status: test
description: This rule flags events where a service principal (application identity) is added as a member, eligible member, or scoped member to a role. Assigning privileged Entra ID or Azure RBAC permissions to an application can enable persistent access and privilege escalation without interactive user activity. It relies on Azure audit log messages indicating role assignment actions and targets service principals.
references:
- https://learn.microsoft.com/en-us/entra/architecture/security-operations-applications#service-principal-assigned-to-a-role
- https://github.com/SigmaHQ/sigma/blob/master/rules/cloud/azure/audit_logs/azure_app_role_added.yml
author: Bailey Bercik '@baileybercik', Mark Morowczynski '@markmorow', Huntrule Team
date: 2022-07-19
modified: 2024-11-04
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.003
logsource:
product: azure
service: auditlogs
detection:
selection:
targetResources.type: Service Principal
properties.message:
- Add member to role
- Add eligible member to role
- Add scoped member to role
condition: selection
falsepositives:
- When the permission is legitimately needed for the app
level: medium
license: DRL-1.1
related:
- id: b04934b2-0a68-4845-8a19-bdfed3a68a7a
type: derived