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

Container Apps Jobs OperatorAzure built-in role

Read, start, and stop Container Apps jobs.

Role IDb9a307c4-5aa3-4b52-ba60-2b17c136cd7b
CategoryContainers
Actions13
Data actions2

Before you assign it

  • It reaches the data, not just the resource. It has 2 data actions, such as reading blobs, secrets or messages.

What it can do

PermissionWhat it allows
Microsoft.Authorization/*/readAny read operation on anything under Microsoft.Authorization
Microsoft.Insights/alertRules/*Every operation under Microsoft.Insights/alertRules
microsoft.app/jobs/readGet a Container Apps Job
Microsoft.App/jobs/*/readAny read operation on anything under Microsoft.App/jobs
Microsoft.App/jobs/*/actionAny action on anything under Microsoft.App/jobs
Microsoft.app/managedenvironments/readGet a Managed Environment
Microsoft.App/managedenvironments/*/readAny read operation on anything under Microsoft.App/managedenvironments
Microsoft.App/managedenvironments/join/actionAllows to create a Container App in a Managed Environment
Microsoft.App/managedenvironments/checknameavailability/actionCheck reource name availability for a Managed Environment
Microsoft.app/connectedEnvironments/readGet a Connected Environment
Microsoft.App/connectedEnvironments/*/readAny read operation on anything under Microsoft.App/connectedEnvironments
Microsoft.App/connectedEnvironments/join/actionAllows to create a Container App or Container Apps Job in a Connected Environment
Microsoft.App/connectedEnvironments/checknameavailability/actionCheck reource name availability for a Connected Environment

Data actions

PermissionWhat it allows
Microsoft.App/jobs/logstream/actionView log stream of a container app job
Microsoft.App/jobs/exec/actionConnect to console of a container app job

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 "Container Apps Jobs Operator" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Container Apps Jobs Operator" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, 'b9a307c4-5aa3-4b52-ba60-2b17c136cd7b')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b9a307c4-5aa3-4b52-ba60-2b17c136cd7b')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "b9a307c4-5aa3-4b52-ba60-2b17c136cd7b"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other containers roles

Find the smallest role for a task →