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

Domain Services ReaderAzure built-in role

Can view Azure AD Domain Services and related network configurations

Role ID361898ef-9ed1-48c2-849c-a832951106bb
CategoryIdentity
Actions28
Data actions0

What it can do

PermissionWhat it allows
Microsoft.Authorization/*/readAny read operation on anything under Microsoft.Authorization
Microsoft.Resources/deployments/readGets or lists deployments.
Microsoft.Resources/deployments/operations/readGets or lists deployment operations.
Microsoft.Resources/deployments/operationstatuses/readGets or lists deployment operation statuses.
Microsoft.Resources/subscriptions/resourceGroups/readGets or lists resource groups.
Microsoft.Insights/AlertRules/ReadRead a classic metric alert
Microsoft.Insights/AlertRules/Incidents/ReadRead a classic metric alert incident
Microsoft.Insights/Logs/ReadReading data from all your logs
Microsoft.Insights/Metrics/readRead metrics
Microsoft.Insights/DiagnosticSettings/readRead a resource diagnostic setting
Microsoft.Insights/DiagnosticSettingsCategories/ReadRead diagnostic settings categories
Microsoft.AAD/domainServices/*/readAny read operation on anything under Microsoft.AAD/domainServices
Microsoft.Network/virtualNetworks/readGet the virtual network definition
Microsoft.Network/virtualNetworks/subnets/readGets a virtual network subnet definition
Microsoft.Network/virtualNetworks/virtualNetworkPeerings/readGets a virtual network peering definition
Microsoft.Network/virtualNetworks/providers/Microsoft.Insights/diagnosticSettings/readGet the diagnostic settings of Virtual Network
Microsoft.Network/virtualNetworks/providers/Microsoft.Insights/metricDefinitions/readGets available metrics for the PingMesh
Microsoft.Network/azureFirewalls/readGet Azure Firewall
Microsoft.Network/ddosProtectionPlans/readGets a DDoS Protection Plan
Microsoft.Network/loadBalancers/readGets a load balancer definition
Microsoft.Network/loadBalancers/*/readAny read operation on anything under Microsoft.Network/loadBalancers
Microsoft.Network/natGateways/read
Microsoft.Network/networkInterfaces/readGets a network interface definition.
Microsoft.Network/networkSecurityGroups/defaultSecurityRules/readGets a default security rule definition
Microsoft.Network/networkSecurityGroups/readGets a network security group definition
Microsoft.Network/networkSecurityGroups/securityRules/readGets a security rule definition
Microsoft.Network/routeTables/readGets a route table definition
Microsoft.Network/routeTables/routes/readGets a route definition

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 "Domain Services Reader" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Domain Services Reader" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, '361898ef-9ed1-48c2-849c-a832951106bb')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "361898ef-9ed1-48c2-849c-a832951106bb"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other identity roles

Find the smallest role for a task →