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

Desktop Virtualization Power On ContributorAzure built-in role

Provide permission to the Azure Virtual Desktop Resource Provider to start virtual machines.

Role ID489581de-a3bd-480d-9518-53dea7416b33
CategoryCompute
Actions14
Data actions0

What it can do

PermissionWhat it allows
Microsoft.Compute/virtualMachines/start/actionStarts the virtual machine
Microsoft.Compute/virtualMachines/readGet the properties of a virtual machine
Microsoft.Compute/virtualMachines/instanceView/readGets the detailed runtime status of the virtual machine and its resources
Microsoft.Authorization/*/readAny read operation on anything under Microsoft.Authorization
Microsoft.Insights/alertRules/*Every operation under Microsoft.Insights/alertRules
Microsoft.Resources/deployments/*Every operation under Microsoft.Resources/deployments
Microsoft.Resources/subscriptions/resourceGroups/readGets or lists resource groups.
Microsoft.HybridCompute/machines/readRead any Azure Arc machines
Microsoft.HybridCompute/operations/readRead all Operations for Azure Arc for Servers
Microsoft.HybridCompute/locations/operationresults/readReads the status of an operation on Microsoft.HybridCompute Resource Provider
Microsoft.HybridCompute/locations/operationstatus/readReads the status of an operation on Microsoft.HybridCompute Resource Provider
Microsoft.AzureStackHCI/virtualMachineInstances/readGets/Lists virtual machine instance resource
Microsoft.AzureStackHCI/virtualMachineInstances/start/actionStarts virtual machine instance resource
Microsoft.AzureStackHCI/operations/readGets operations

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 "Desktop Virtualization Power On Contributor" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Desktop Virtualization Power On Contributor" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, '489581de-a3bd-480d-9518-53dea7416b33')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '489581de-a3bd-480d-9518-53dea7416b33')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "489581de-a3bd-480d-9518-53dea7416b33"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other compute roles

Find the smallest role for a task →