azureblog.co.uk
← cd ~/roles
// roles/azure · privileged

ContributorAzure built-in role

Grants full access to manage all resources, but does not allow you to assign roles in Azure RBAC, manage assignments in Azure Blueprints, or share image galleries.

Role IDb24988ac-6180-42a0-ab88-20f7382dd24c
CategoryPrivileged
Actions1 (minus 11 NotActions)
Data actions0

Before you assign it

  • Full control. It includes *, so it can do almost anything to resources in scope, except the 11 operations listed under "Can't do".

What it can do

PermissionWhat it allows
*Every operation on every resource type

Can't do

These are taken away from the actions above.

PermissionWhat it allows
Microsoft.Authorization/*/DeleteAny delete operation on anything under Microsoft.Authorization
Microsoft.Authorization/*/WriteAny write operation on anything under Microsoft.Authorization
Microsoft.Authorization/elevateAccess/ActionGrants the caller User Access Administrator access at the tenant scope
Microsoft.Blueprint/blueprintAssignments/writeCreate or update any blueprint artifacts
Microsoft.Blueprint/blueprintAssignments/deleteDelete any blueprint artifacts
Microsoft.Compute/galleries/share/actionShares a Gallery to different scopes
Microsoft.Purview/consents/writeCreate or Update a Consent Resource.
Microsoft.Purview/consents/deleteDelete the Consent Resource.
Microsoft.Resources/deploymentStacks/manageDenySetting/actionManage the denySettings property of a deployment stack.
Microsoft.Subscription/cancel/actionCancels the Subscription
Microsoft.Subscription/enable/actionReactivates the Subscription

Assign it

Scope it as tightly as you can: a resource or resource group rather than the whole subscription.

azure cli
az role assignment create \
  --assignee "jane.doe@contoso.com" \
  --role "Contributor" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Contributor" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, 'b24988ac-6180-42a0-ab88-20f7382dd24c')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "b24988ac-6180-42a0-ab88-20f7382dd24c"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other privileged roles

Find the smallest role for a task →