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

Automation OperatorAzure built-in role

Automation Operators are able to start, stop, suspend, and resume jobs

Role IDd3881f73-407a-4167-8283-e981cbba0404
CategoryManagement-and-governance
Actions21
Data actions0

What it can do

PermissionWhat it allows
Microsoft.Authorization/*/readAny read operation on anything under Microsoft.Authorization
Microsoft.Automation/automationAccounts/hybridRunbookWorkerGroups/readReads a Hybrid Runbook Worker Group
Microsoft.Automation/automationAccounts/jobs/readGets an Azure Automation job
Microsoft.Automation/automationAccounts/jobs/resume/actionResumes an Azure Automation job
Microsoft.Automation/automationAccounts/jobs/stop/actionStops an Azure Automation job
Microsoft.Automation/automationAccounts/jobs/streams/readGets an Azure Automation job stream
Microsoft.Automation/automationAccounts/jobs/suspend/actionSuspends an Azure Automation job
Microsoft.Automation/automationAccounts/jobs/writeCreates an Azure Automation job
Microsoft.Automation/automationAccounts/jobSchedules/readGets an Azure Automation job schedule
Microsoft.Automation/automationAccounts/jobSchedules/writeCreates an Azure Automation job schedule
Microsoft.Automation/automationAccounts/linkedWorkspace/readGets the workspace linked to the automation account
Microsoft.Automation/automationAccounts/readGets an Azure Automation account
Microsoft.Automation/automationAccounts/runbooks/readGets an Azure Automation runbook
Microsoft.Automation/automationAccounts/schedules/readGets an Azure Automation schedule asset
Microsoft.Automation/automationAccounts/schedules/writeCreates or updates an Azure Automation schedule asset
Microsoft.Insights/alertRules/*Every operation under Microsoft.Insights/alertRules
Microsoft.ResourceHealth/availabilityStatuses/readGets the availability statuses for all resources in the specified scope
Microsoft.Resources/deployments/*Every operation under Microsoft.Resources/deployments
Microsoft.Automation/automationAccounts/jobs/output/readGets the output of a job
Microsoft.Resources/subscriptions/resourceGroups/readGets or lists resource groups.
Microsoft.Support/*Every operation under Microsoft.Support

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 "Automation Operator" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Automation Operator" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, 'd3881f73-407a-4167-8283-e981cbba0404')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd3881f73-407a-4167-8283-e981cbba0404')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "d3881f73-407a-4167-8283-e981cbba0404"
| 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 →