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

API Management Service Reader RoleAzure built-in role

Read-only access to service and APIs

Role ID71522526-b88f-4d52-b57f-d31fc3546d0d
CategoryIntegration
Actions8 (minus 1 NotActions)
Data actions0

What it can do

PermissionWhat it allows
Microsoft.ApiManagement/service/*/readAny read operation on anything under Microsoft.ApiManagement/service
Microsoft.ApiManagement/service/readRead metadata for an API Management Service instance
Microsoft.Authorization/*/readAny read operation on anything under Microsoft.Authorization
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/readGets or lists deployments.
Microsoft.Resources/subscriptions/resourceGroups/readGets or lists resource groups.
Microsoft.Support/*Every operation under Microsoft.Support

Can't do

These are taken away from the actions above.

PermissionWhat it allows
Microsoft.ApiManagement/service/users/keys/readGet keys associated with user

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 "API Management Service Reader Role" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "API Management Service Reader Role" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, '71522526-b88f-4d52-b57f-d31fc3546d0d')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '71522526-b88f-4d52-b57f-d31fc3546d0d')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "71522526-b88f-4d52-b57f-d31fc3546d0d"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other integration roles

Find the smallest role for a task →