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

Azure Kubernetes Service Namespace UserAzure built-in role

Allows users to read Azure Kubernetes Service namespace resources. In-cluster namespace access further requires assignment of Azure Kubernetes Service RBAC roles to the namespace resource for an Entra ID enabled cluster.

Role IDc9f76ca8-b262-4b10-8ed2-09cf0948aa35
CategoryContainers
Actions2
Data actions0

What it can do

PermissionWhat it allows
Microsoft.ContainerService/managedClusters/managedNamespaces/readGet a managed namespace of a managed cluster
Microsoft.ContainerService/managedClusters/managedNamespaces/listCredential/actionList cluster credentials of a managed namespace

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 "Azure Kubernetes Service Namespace User" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Azure Kubernetes Service Namespace User" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, 'c9f76ca8-b262-4b10-8ed2-09cf0948aa35')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'c9f76ca8-b262-4b10-8ed2-09cf0948aa35')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "c9f76ca8-b262-4b10-8ed2-09cf0948aa35"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other containers roles

Find the smallest role for a task →