azureblog.co.uk
← cd ~/roles
// roles/azure · management-and-governance

Management Group ContributorAzure built-in role

Management Group Contributor Role

Role ID5d58bcaf-24a5-4b20-bdb6-eed9f69fbe4c
CategoryManagement-and-governance
Actions7
Data actions0

What it can do

PermissionWhat it allows
Microsoft.Management/managementGroups/deleteDelete management group.
Microsoft.Management/managementGroups/readList management groups for the authenticated user.
Microsoft.Management/managementGroups/subscriptions/deleteDe-associates subscription from the management group.
Microsoft.Management/managementGroups/subscriptions/writeAssociates existing subscription with the management group.
Microsoft.Management/managementGroups/writeCreate or update a management group.
Microsoft.Management/managementGroups/subscriptions/readLists subscription under the given management group.
Microsoft.Authorization/*/readAny read operation on anything under Microsoft.Authorization

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 "Management Group Contributor" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Management Group Contributor" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, '5d58bcaf-24a5-4b20-bdb6-eed9f69fbe4c')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5d58bcaf-24a5-4b20-bdb6-eed9f69fbe4c')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "5d58bcaf-24a5-4b20-bdb6-eed9f69fbe4c"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other management-and-governance roles

Find the smallest role for a task →