AZ_ASSIGN_ROLES
Summary
Forestall ACL Alias
AZ_ASSIGN_ROLES
Azure Alias
Assign Roles (Role Assignment Write)
Affected Object Types
Subscriptions, Management Groups, Resource Groups, Resources
Exploitation Certainty
Certain
Custom Role Action
Microsoft.Authorization/roleAssignments/write - create, update, or delete role assignments
Built-in Roles:
Owner (
8e3af657-a8ff-443c-a75c-2fe8c4bcb635)User Access Administrator (
18d7d88d-d35e-4fb5-a5c3-7773c20a72d9)Role Based Access Control Administrator (
f58310d9-a9f6-439a-9e8d-f62e7b41a168)Reservations Administrator (
a8889054-8d42-49c9-bc1c-52486c10e7cd)
Description
AZ_ASSIGN_ROLES represents the ability to create, modify, or delete Azure RBAC role assignments. This is one of the most dangerous permissions in Azure because it enables direct privilege escalation.
A principal with Microsoft.Authorization/roleAssignments/write at a given scope can:
Grant themselves Owner - assign themselves or a controlled identity the Owner role.
Grant any role to any principal - create role assignments for users, groups, service principals, or managed identities.
Enable lateral movement - assign roles to other compromised identities.
Establish persistence - create hidden role assignments that survive credential rotation.
The ability to assign roles is explicitly excluded from the Contributor role, making it the key differentiator between Contributor and Owner.
Owner
Yes
Contributor
No
User Access Administrator
Yes
Role Based Access Control Administrator
Yes
Identification
PowerShell (Az Module)
Azure CLI
Azure Portal
Open Azure Portal -> Subscriptions (or target scope).
Go to Access control (IAM) -> Role assignments.
Filter by Role = Owner or Role = User Access Administrator.
Review all principals listed - these can assign roles.
Exploitation
Self-Elevation to Owner

Assign Owner to a Service Principal for Persistence

Azure CLI

Mitigation
Minimize principals with role assignment capability
Remove Owner and User Access Administrator from identities that don't strictly need them.
Use Contributor where full resource management is needed but role assignment is not.
Use Privileged Identity Management (PIM)
Configure eligible (not permanent) assignments for Owner and User Access Administrator.
Require approval and MFA for activation.
Set short activation windows.
Apply conditions to role assignments
Use Azure ABAC (Attribute-Based Access Control) to constrain what roles can be assigned.
The Role Based Access Control Administrator role supports conditions by default.
Use Azure Policy
Create policies to audit or deny role assignments to specific principals or at broad scopes.
Enable alerts
Configure alerts for
Microsoft.Authorization/roleAssignments/writeoperations.
Detection
Use the Azure Portal:
Open Azure Portal -> Monitor -> Activity Log.
Filter by Operation name =
Create role assignmentorDelete role assignment.Review the Caller and Target Resource to identify who made role assignment changes and what was assigned.
For subscription-level view: Go to Subscriptions -> select subscription -> Activity log -> filter for
Microsoft.Authorization/roleAssignments/write.
References
Last updated
Was this helpful?