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

Security ReaderAzure built-in role

Security Reader Role

Role ID39bc4728-0917-49c7-9d2c-d95423bc2eb4
CategorySecurity
Actions14
Data actions0

What it can do

PermissionWhat it allows
Microsoft.Authorization/*/readAny read operation on anything under Microsoft.Authorization
Microsoft.Insights/alertRules/readRead a classic metric alert
Microsoft.operationalInsights/workspaces/*/readAny read operation on anything under Microsoft.operationalInsights/workspaces
Microsoft.Resources/deployments/*/readAny read operation on anything under Microsoft.Resources/deployments
Microsoft.Resources/subscriptions/resourceGroups/readGets or lists resource groups.
Microsoft.Security/*/readAny read operation on anything under Microsoft.Security
Microsoft.IoTSecurity/*/readAny read operation on anything under Microsoft.IoTSecurity
Microsoft.Support/*/readAny read operation on anything under Microsoft.Support
Microsoft.Security/iotDefenderSettings/packageDownloads/actionGets downloadable IoT Defender packages information
Microsoft.Security/iotDefenderSettings/downloadManagerActivation/actionDownload manager activation file with subscription quota data
Microsoft.Security/iotSensors/downloadResetPassword/actionDownloads reset password file for IoT Sensors
Microsoft.IoTSecurity/defenderSettings/packageDownloads/actionGets downloadable IoT Defender packages information
Microsoft.IoTSecurity/defenderSettings/downloadManagerActivation/actionDownload manager activation file
Microsoft.Management/managementGroups/readList management groups for the authenticated 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 "Security Reader" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Security Reader" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, '39bc4728-0917-49c7-9d2c-d95423bc2eb4')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '39bc4728-0917-49c7-9d2c-d95423bc2eb4')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "39bc4728-0917-49c7-9d2c-d95423bc2eb4"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other security roles

Find the smallest role for a task →