AZ_HAS_ARM_ROLE
Summary
Description
Component
Description
Example
Identification
PowerShell (Az Module)
Connect-AzAccount
# List all ARM role assignments in the current subscription
Get-AzRoleAssignment |
Select-Object DisplayName, SignInName, ObjectType, RoleDefinitionName, Scope |
Sort-Object RoleDefinitionName |
Format-Table -AutoSize
# List role assignments for a specific principal
Get-AzRoleAssignment -SignInName "[email protected]" |
Select-Object RoleDefinitionName, Scope, ObjectType |
Format-Table -AutoSize
# List role assignments for a specific service principal
Get-AzRoleAssignment -ObjectId "<ServicePrincipalObjectId>" |
Select-Object RoleDefinitionName, Scope, ObjectType |
Format-Table -AutoSize
# List all role assignments at a specific scope (subscription)
Get-AzRoleAssignment -Scope "/subscriptions/<SubscriptionId>" |
Select-Object DisplayName, RoleDefinitionName, ObjectType, Scope |
Format-Table -AutoSize
# List all privileged role assignments (Owner, Contributor, User Access Administrator)
Get-AzRoleAssignment |
Where-Object { $_.RoleDefinitionName -in @("Owner", "Contributor", "User Access Administrator") } |
Select-Object DisplayName, RoleDefinitionName, ObjectType, Scope |
Sort-Object RoleDefinitionName |
Format-Table -AutoSizeAzure GUI
Exploitation
Role Assignment
Impact
Mitigation
Detection
References
Last updated
Was this helpful?