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

Container Registry Tasks ContributorAzure built-in role

Provides permissions to configure, read, list, trigger, or cancel Container Registry Tasks, Task Runs, Task Logs, Quick Runs, Quick Builds, and Task Agent Pools. Permissions granted for Tasks management can be used for full registry data plane permissions including reading/writing/deleting container images in registries. Permissions granted for Tasks management can also be used to run customer authored build directives and run scripts to build software artifacts.

Role IDfb382eab-e894-4461-af04-94435c366c3f
CategoryContainers
Actions24
Data actions0

What it can do

PermissionWhat it allows
Microsoft.ContainerRegistry/registries/agentpools/readGet a agentpool for a container registry or list all agentpools.
Microsoft.ContainerRegistry/registries/agentpools/writeCreate or Update an agentpool for a container registry.
Microsoft.ContainerRegistry/registries/agentpools/deleteDelete an agentpool for a container registry.
Microsoft.ContainerRegistry/registries/agentpools/listQueueStatus/actionList all queue status of an agentpool for a container registry.
Microsoft.ContainerRegistry/registries/agentpools/operationResults/status/readGets an agentpool async operation result status
Microsoft.ContainerRegistry/registries/agentpools/operationStatuses/readGets an agentpool async operation status
Microsoft.ContainerRegistry/registries/tasks/readGets a task for a container registry or list all tasks.
Microsoft.ContainerRegistry/registries/tasks/writeCreates or Updates a task for a container registry.
Microsoft.ContainerRegistry/registries/tasks/deleteDeletes a task for a container registry.
Microsoft.ContainerRegistry/registries/tasks/listDetails/actionList all details of a task for a container registry.
Microsoft.ContainerRegistry/registries/scheduleRun/actionSchedule a run against a container registry.
Microsoft.ContainerRegistry/registries/listBuildSourceUploadUrl/actionGet source upload url location for a container registry.
Microsoft.ContainerRegistry/registries/runs/readGets the properties of a run against a container registry or list runs.
Microsoft.ContainerRegistry/registries/runs/writeUpdates a run.
Microsoft.ContainerRegistry/registries/runs/listLogSasUrl/actionGets the log SAS URL for a run.
Microsoft.ContainerRegistry/registries/runs/cancel/actionCancel an existing run.
Microsoft.ContainerRegistry/registries/taskruns/readGet a taskrun for a container registry or list all taskruns.
Microsoft.ContainerRegistry/registries/taskruns/writeCreate or Update a taskrun for a container registry.
Microsoft.ContainerRegistry/registries/taskruns/deleteDelete a taskrun for a container registry.
Microsoft.ContainerRegistry/registries/taskruns/listDetails/actionList all details of a taskrun for a container registry.
Microsoft.ContainerRegistry/registries/taskruns/operationStatuses/readGets a taskrun async operation status
Microsoft.Resources/deployments/*Every operation under Microsoft.Resources/deployments
Microsoft.Resources/subscriptions/resourceGroups/readGets or lists resource groups.
Microsoft.ContainerRegistry/registries/readGets the properties of the specified container registry or lists all the container registries under the specified resource group or 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 "Container Registry Tasks Contributor" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Container Registry Tasks Contributor" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, 'fb382eab-e894-4461-af04-94435c366c3f')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'fb382eab-e894-4461-af04-94435c366c3f')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "fb382eab-e894-4461-af04-94435c366c3f"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other containers roles

Find the smallest role for a task →