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

Redis Cache ContributorAzure built-in role

Create and manage Azure Cache for Redis resources. Cannot read or write data stored in the cache.

Role IDe0f68234-74aa-48ed-b826-c38b57376e17
CategoryDatabases
Actions8
Data actions0

What it can do

PermissionWhat it allows
Microsoft.Authorization/*/readAny read operation on anything under Microsoft.Authorization
Microsoft.Cache/register/actionRegisters the 'Microsoft.Cache' resource provider with a subscription
Microsoft.Cache/redis/*Every operation under Microsoft.Cache/redis
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.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 "Redis Cache Contributor" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Redis Cache Contributor" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, 'e0f68234-74aa-48ed-b826-c38b57376e17')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e0f68234-74aa-48ed-b826-c38b57376e17')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "e0f68234-74aa-48ed-b826-c38b57376e17"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other databases roles

Find the smallest role for a task →