← cd ~/roles
// roles/azure · containers
Container Apps OperatorAzure built-in role
Read, logstream and exec into Container Apps.
| Role ID | f3bd1b5c-91fa-40e7-afe7-0c11d331232c |
|---|---|
| Category | Containers |
| Actions | 12 |
| Data actions | 3 |
Before you assign it
- It reaches the data, not just the resource. It has 3 data actions, such as reading blobs, secrets or messages.
What it can do
| Permission | What it allows |
|---|---|
Microsoft.Authorization/*/read | Any read operation on anything under Microsoft.Authorization |
Microsoft.Insights/alertRules/* | Every operation under Microsoft.Insights/alertRules |
Microsoft.App/containerApps/*/read | Any read operation on anything under Microsoft.App/containerApps |
Microsoft.App/containerApps/*/action | Any action on anything under Microsoft.App/containerApps |
Microsoft.App/managedEnvironments/read | Get a Managed Environment |
Microsoft.App/managedEnvironments/*/read | Any read operation on anything under Microsoft.App/managedEnvironments |
Microsoft.App/managedEnvironments/join/action | Allows to create a Container App in a Managed Environment |
Microsoft.App/managedEnvironments/checknameavailability/action | Check reource name availability for a Managed Environment |
Microsoft.App/connectedEnvironments/read | Get a Connected Environment |
Microsoft.App/connectedEnvironments/*/read | Any read operation on anything under Microsoft.App/connectedEnvironments |
Microsoft.App/connectedEnvironments/join/action | Allows to create a Container App or Container Apps Job in a Connected Environment |
Microsoft.App/connectedEnvironments/checknameavailability/action | Check reource name availability for a Connected Environment |
Data actions
| Permission | What it allows |
|---|---|
Microsoft.App/containerApps/logstream/action | View log stream of a container app |
Microsoft.App/containerApps/exec/action | Connect to console of a container app |
Microsoft.App/containerApps/debug/action | Connect to debug console of a container app |
Assign it
Scope it as tightly as you can: a resource or resource group rather than the whole subscription.
az role assignment create \
--assignee "jane.doe@contoso.com" \
--role "Container Apps Operator" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "Container Apps Operator" `
-Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(resourceGroup().id, principalId, 'f3bd1b5c-91fa-40e7-afe7-0c11d331232c')
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f3bd1b5c-91fa-40e7-afe7-0c11d331232c')
principalId: principalId
}
}Who already has it?
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "f3bd1b5c-91fa-40e7-afe7-0c11d331232c"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)Other containers roles
- AcrDelete · 1 permission
- AcrPull · 1 permission
- Connected Cluster Managed Identity CheckAccess Reader · 1 permission
- Container Registry Cache Rule Reader · 1 permission
- Container Registry Credential Set Reader · 1 permission
- Container Registry Repository Catalog Lister · 1 permission
- AcrImageSigner · 2 permissions
- AcrPush · 2 permissions