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

Virtual Machine Data Access Administrator (preview)Azure built-in role

Manage access to Virtual Machines by adding or removing role assignments for the Virtual Machine Administrator Login and Virtual Machine User Login roles. Includes an ABAC condition to constrain role assignments.

Role ID66f75aeb-eabe-4b70-9f1e-c350c4c9ad04
CategoryCompute
Actions14
Data actions0

Before you assign it

  • It can give access to others. It allows Microsoft.Authorization/roleAssignments/write, so treat it as a privileged role and assign it through PIM where you can.

What it can do

PermissionWhat it allows
Microsoft.Authorization/roleAssignments/writeCreate a role assignment at the specified scope.
Microsoft.Authorization/roleAssignments/deleteDelete a role assignment at the specified scope.
Microsoft.Authorization/*/readAny read operation on anything under Microsoft.Authorization
Microsoft.Resources/subscriptions/resourceGroups/readGets or lists resource groups.
Microsoft.Resources/subscriptions/readGets the list of subscriptions.
Microsoft.Management/managementGroups/readList management groups for the authenticated user.
Microsoft.Network/publicIPAddresses/readGets a public IP address definition.
Microsoft.Network/virtualNetworks/readGet the virtual network definition
Microsoft.Network/loadBalancers/readGets a load balancer definition
Microsoft.Network/networkInterfaces/readGets a network interface definition.
Microsoft.Compute/virtualMachines/*/readAny read operation on anything under Microsoft.Compute/virtualMachines
Microsoft.HybridCompute/machines/*/readAny read operation on anything under Microsoft.HybridCompute/machines
Microsoft.Resources/deployments/*Every operation under Microsoft.Resources/deployments
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 "Virtual Machine Data Access Administrator (preview)" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Virtual Machine Data Access Administrator (preview)" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, '66f75aeb-eabe-4b70-9f1e-c350c4c9ad04')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '66f75aeb-eabe-4b70-9f1e-c350c4c9ad04')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "66f75aeb-eabe-4b70-9f1e-c350c4c9ad04"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other compute roles

Find the smallest role for a task →