← cd ~/roles
// roles/azure · security
Security ReaderAzure built-in role
Security Reader Role
| Role ID | 39bc4728-0917-49c7-9d2c-d95423bc2eb4 |
|---|---|
| Category | Security |
| Actions | 14 |
| Data actions | 0 |
What it can do
| Permission | What it allows |
|---|---|
Microsoft.Authorization/*/read | Any read operation on anything under Microsoft.Authorization |
Microsoft.Insights/alertRules/read | Read a classic metric alert |
Microsoft.operationalInsights/workspaces/*/read | Any read operation on anything under Microsoft.operationalInsights/workspaces |
Microsoft.Resources/deployments/*/read | Any read operation on anything under Microsoft.Resources/deployments |
Microsoft.Resources/subscriptions/resourceGroups/read | Gets or lists resource groups. |
Microsoft.Security/*/read | Any read operation on anything under Microsoft.Security |
Microsoft.IoTSecurity/*/read | Any read operation on anything under Microsoft.IoTSecurity |
Microsoft.Support/*/read | Any read operation on anything under Microsoft.Support |
Microsoft.Security/iotDefenderSettings/packageDownloads/action | Gets downloadable IoT Defender packages information |
Microsoft.Security/iotDefenderSettings/downloadManagerActivation/action | Download manager activation file with subscription quota data |
Microsoft.Security/iotSensors/downloadResetPassword/action | Downloads reset password file for IoT Sensors |
Microsoft.IoTSecurity/defenderSettings/packageDownloads/action | Gets downloadable IoT Defender packages information |
Microsoft.IoTSecurity/defenderSettings/downloadManagerActivation/action | Download manager activation file |
Microsoft.Management/managementGroups/read | List 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.
az role assignment create \
--assignee "jane.doe@contoso.com" \
--role "Security Reader" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "Security Reader" `
-Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"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?
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
- App Compliance Automation Reader · 1 permission
- Key Vault Crypto Service Release User · 1 permission
- Security Assessment Contributor · 1 permission
- Attestation Reader · 2 permissions
- Key Vault Secrets User · 2 permissions
- Attestation Contributor · 3 permissions
- Locks Contributor · 3 permissions
- Key Vault Certificate User · 4 permissions