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

VM Restore OperatorAzure built-in role

Create and Delete resources during VM Restore. This role is in preview and subject to change.

Role IDdfce8971-25e3-42e3-ba33-6055438e3080
CategoryCompute
Actions41
Data actions4

Before you assign it

  • It reaches the data, not just the resource. It has 4 data actions, such as reading blobs, secrets or messages.

What it can do

PermissionWhat it allows
Microsoft.Authorization/*/readAny read operation on anything under Microsoft.Authorization
Microsoft.Compute/disks/readGet the properties of a Disk
Microsoft.Compute/disks/writeCreates a new Disk or updates an existing one
Microsoft.Compute/disks/deleteDeletes the Disk
Microsoft.Compute/disks/beginGetAccess/actionGet the SAS URI of the Disk for blob access
Microsoft.Compute/disks/endGetAccess/actionRevoke the SAS URI of the Disk
Microsoft.Compute/locations/diskOperations/readGets the status of an asynchronous Disk operation
Microsoft.Compute/virtualMachines/readGet the properties of a virtual machine
Microsoft.Compute/virtualMachines/writeCreates a new virtual machine or updates an existing virtual machine
Microsoft.Compute/virtualMachines/deleteDeletes the virtual machine
Microsoft.Compute/virtualMachines/instanceView/readGets the detailed runtime status of the virtual machine and its resources
Microsoft.Compute/virtualMachines/extensions/readGet the properties of a virtual machine extension
Microsoft.Compute/virtualMachines/extensions/writeCreates a new virtual machine extension or updates an existing one
Microsoft.Compute/virtualMachines/extensions/deleteDeletes the virtual machine extension
Microsoft.Insights/alertRules/*Every operation under Microsoft.Insights/alertRules
Microsoft.Network/locations/operationResults/readGets operation result of an async POST or DELETE operation
Microsoft.Network/locations/operations/readGets operation resource that represents status of an asynchronous operation
Microsoft.Network/locations/usages/readGets the resources usage metrics
Microsoft.Network/networkInterfaces/deleteDeletes a network interface
Microsoft.Network/networkInterfaces/ipconfigurations/readGets a network interface ip configuration definition.
Microsoft.Network/networkInterfaces/join/actionJoins a Virtual Machine to a network interface. Not Alertable.
Microsoft.Network/networkInterfaces/readGets a network interface definition.
Microsoft.Network/networkInterfaces/writeCreates a network interface or updates an existing network interface.
Microsoft.Network/networkSecurityGroups/readGets a network security group definition
Microsoft.Network/networkSecurityGroups/securityRules/readGets a security rule definition
Microsoft.Network/publicIPAddresses/deleteDeletes a public IP address.
Microsoft.Network/publicIPAddresses/join/actionJoins a public IP address. Not Alertable.
Microsoft.Network/publicIPAddresses/readGets a public IP address definition.
Microsoft.Network/publicIPAddresses/writeCreates a public IP address or updates an existing public IP address.
Microsoft.Network/virtualNetworks/readGet the virtual network definition
Microsoft.Network/virtualNetworks/subnets/join/actionJoins a virtual network. Not Alertable.
Microsoft.Network/virtualNetworks/subnets/readGets a virtual network subnet definition
Microsoft.Resources/deployments/*Every operation under Microsoft.Resources/deployments
Microsoft.Resources/subscriptions/resourceGroups/readGets or lists resource groups.
Microsoft.Storage/checkNameAvailability/readChecks that account name is valid and is not in use.
Microsoft.Storage/storageAccounts/blobServices/containers/deleteReturns the result of deleting a container
Microsoft.Storage/storageAccounts/blobServices/containers/readReturns a container
Microsoft.Storage/storageAccounts/blobServices/containers/writeReturns the result of patch blob container
Microsoft.Storage/storageAccounts/listKeys/actionReturns the access keys for the specified storage account.
Microsoft.Storage/storageAccounts/readReturns the list of storage accounts or gets the properties for the specified storage account.
Microsoft.Storage/storageAccounts/writeCreates a storage account with the specified parameters or update the properties or tags or adds custom domain for the specified storage account.

Data actions

PermissionWhat it allows
Microsoft.Storage/storageAccounts/blobServices/containers/blobs/deleteReturns the result of deleting a blob
Microsoft.Storage/storageAccounts/blobServices/containers/blobs/readReturns a blob or a list of blobs
Microsoft.Storage/storageAccounts/blobServices/containers/blobs/writeReturns the result of writing a blob
Microsoft.Storage/storageAccounts/blobServices/containers/blobs/add/actionReturns the result of adding blob content

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 "VM Restore Operator" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "VM Restore Operator" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, 'dfce8971-25e3-42e3-ba33-6055438e3080')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'dfce8971-25e3-42e3-ba33-6055438e3080')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "dfce8971-25e3-42e3-ba33-6055438e3080"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other compute roles

Find the smallest role for a task →