AZ_MG_GRANT_ROLE
Summary
FSProtect ACL Alias
AZ_MG_GRANT_ROLE
Entra ID (Azure AD) Alias
Grant Directory Roles (Microsoft Graph)
Affected Object Types
Directory Roles, Users, Groups, Service Principals (including role-assignable groups)
Exploitation Certainty
Certain
Graph Permission / Role
Ability to grant Microsoft Entra directory roles via Microsoft Graph using delegated scopes and/or application permissions such as: RoleManagement.ReadWrite.Directory, Directory.ReadWrite.All (and for PIM-based flows, permissions related to role assignment/eligibility schedules). Delegated usage also requires a supported directory role such as Privileged Role Administrator, Role Management Administrator, or Global Administrator
Description
AZ_MG_GRANT_ROLE represents the ability for a principal to grant Microsoft Entra directory roles via Microsoft Graph.
By granting themselves (or a controlled identity) a privileged directory role, an attacker can:
Gain administrative control over the tenant (for example by assigning high-privilege roles).
Modify identity, access, and security configuration depending on the role granted.
Establish persistence by granting roles to service principals, managed identities, or role-assignable groups.
Therefore, any identity that can grant directory roles through Microsoft Graph can quickly escalate privileges by creating role assignments or privileged role schedule requests.
Identification
PowerShell (Microsoft Graph)
Enumerate service principals that have Microsoft Graph application permissions that are sufficient to grant directory roles (for example, RoleManagement.ReadWrite.Directory or Directory.ReadWrite.All).
Azure GUI
Exploitation
PowerShell (Microsoft Graph)
Azure GUI
Mitigation
Minimize membership of privileged roles:
Keep Global Administrator, Privileged Role Administrator, and Role Management Administrator assignments very small.
Use PIM for privileged roles:
Prefer eligible assignments and time-bound activations.
Require MFA and approval for activation where appropriate.
Reduce Microsoft Graph exposure:
Remove unnecessary Graph application permissions from service principals.
Prioritize removing
RoleManagement.ReadWrite.DirectoryandDirectory.ReadWrite.Allwhen not strictly required.
Enforce change control:
Require tickets/approvals for role assignment changes.
Review role assignments regularly.
Detection
Monitor Microsoft Entra Audit logs for directory role assignment changes.
Go to Microsoft Entra ID → Audit logs.
Filter for role management activities.
Investigate events related to:
Adding members to directory roles.
Adding eligible assignments (PIM).
Creating role assignment or eligibility schedule requests.
Record:
Initiated by (actor)
Target resources
Role name and scope information
References
https://learn.microsoft.com/en-us/graph/api/rbacapplication-post-roleassignments?view=graph-rest-1.0
https://learn.microsoft.com/en-us/graph/api/directoryrole-list?view=graph-rest-1.0
https://learn.microsoft.com/en-us/graph/api/rbacapplication-post-roleeligibilityschedulerequests?view=graph-rest-1.0
https://learn.microsoft.com/en-us/graph/api/rbacapplication-list-roleeligibilityschedulerequests?view=graph-rest-1.0
https://learn.microsoft.com/en-us/graph/api/rbacapplication-post-roleassignmentschedulerequests?view=graph-rest-1.0
https://learn.microsoft.com/en-us/graph/api/rbacapplication-list-roleassignmentschedulerequests?view=graph-rest-1.0
https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.identity.governance/get-mgrolemanagementdirectoryroleassignment?view=graph-powershell-1.0
https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.identity.governance/new-mgrolemanagementdirectoryroleassignment?view=graph-powershell-1.0
https://learn.microsoft.com/en-us/graph/permissions-reference
https://learn.microsoft.com/en-us/entra/identity/monitoring-health/reference-audit-activities
Last updated
Was this helpful?