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

Azure Migrate Execute ExpertAzure built-in role

Grants restricted access on an Azure Migrate project to only perform migration related operations, including replication, execution of test migrations, tracking and monitoring of migration progress, and initiation of agentless and agent-based migrations.

Role ID1cfa4eac-9a23-481c-a793-bfb6958e836b
CategoryMigration
Actions45 (minus 6 NotActions)
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.Resources/subscriptions/resourceGroups/readGets or lists resource groups.
Microsoft.Resources/subscriptions/readGets the list of subscriptions.
Microsoft.Resources/deployments/*Every operation under Microsoft.Resources/deployments
Microsoft.Resources/subscriptions/resourceGroups/writeCreates or updates a resource group.
Microsoft.Resources/subscriptions/locations/readGets the list of locations supported.
Microsoft.Resources/checkResourceName/actionCheck the resource name for validity.
Microsoft.Resources/deploymentScripts/writeCreates or updates a deployment script
Microsoft.Resources/deploymentScripts/readGets or lists deployment scripts
Microsoft.Resources/links/writeCreates or updates a resource link.
Microsoft.Authorization/*/readAny read operation on anything under Microsoft.Authorization
Microsoft.Authorization/locks/writeAdd locks at the specified scope.
Microsoft.Authorization/locks/deleteDelete locks at the specified scope.
Microsoft.Insights/alertRules/*Every operation under Microsoft.Insights/alertRules
Microsoft.Migrate/*/readAny read operation on anything under Microsoft.Migrate
Microsoft.ApplicationMigration/*/readAny read operation on anything under Microsoft.ApplicationMigration
Microsoft.OffAzure/*/readAny read operation on anything under Microsoft.OffAzure
Microsoft.MySQLDiscovery/*/readAny read operation on anything under Microsoft.MySQLDiscovery
Microsoft.Support/*Every operation under Microsoft.Support
Microsoft.Network/networkInterfaces/readGets a network interface definition.
Microsoft.Network/networkInterfaces/writeCreates a network interface or updates an existing network interface.
Microsoft.Network/networkInterfaces/deleteDeletes a network interface
Microsoft.Network/virtualNetworks/readGet the virtual network definition
Microsoft.Network/virtualNetworks/subnets/readGets a virtual network subnet definition
Microsoft.Storage/storageAccounts/*/readAny read operation on anything under Microsoft.Storage/storageAccounts
Microsoft.Storage/storageAccounts/*/writeAny write operation on anything under Microsoft.Storage/storageAccounts
Microsoft.Storage/storageAccounts/listKeys/actionReturns the access keys for the specified storage account.
Microsoft.Compute/register/actionRegisters Subscription with Microsoft.Compute resource provider
Microsoft.Compute/availabilitySets/readGet the properties of an availability set
Microsoft.Compute/availabilitySets/vmSizes/readList available sizes for creating or updating a virtual machine in the availability set
Microsoft.Compute/diskEncryptionSets/readGet the properties of a disk encryption set
Microsoft.Compute/skus/readGets the list of Microsoft.Compute SKUs available for your Subscription
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/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.RecoveryServices/vaults/*Every operation under Microsoft.RecoveryServices/vaults
Microsoft.RecoveryServices/register/actionRegisters subscription for given Resource Provider
Microsoft.RecoveryServices/operations/readOperation returns the list of Operations for a Resource Provider
Microsoft.Resources/links/readGets or lists resource links.
Microsoft.DependencyMap/*/readAny read operation on anything under Microsoft.DependencyMap
Microsoft.DependencyMap/maps/*/actionAny action on anything under Microsoft.DependencyMap/maps
Microsoft.Authorization/roleAssignments/writeCreate a role assignment at the specified scope.
Microsoft.Authorization/roleAssignments/deleteDelete a role assignment at the specified scope.

Can't do

These are taken away from the actions above.

PermissionWhat it allows
Microsoft.OffAzure/hypervSites/machines/inventoryinsights/pendingupdates/*Every operation under Microsoft.OffAzure/hypervSites/machines/inventoryinsights/pendingupdates
Microsoft.OffAzure/hypervSites/machines/inventoryinsights/vulnerabilities/*Every operation under Microsoft.OffAzure/hypervSites/machines/inventoryinsights/vulnerabilities
Microsoft.OffAzure/serverSites/machines/inventoryinsights/pendingupdates/*Every operation under Microsoft.OffAzure/serverSites/machines/inventoryinsights/pendingupdates
Microsoft.OffAzure/serverSites/machines/inventoryinsights/vulnerabilities/*Every operation under Microsoft.OffAzure/serverSites/machines/inventoryinsights/vulnerabilities
Microsoft.OffAzure/vmwareSites/machines/inventoryinsights/vulnerabilities/*Every operation under Microsoft.OffAzure/vmwareSites/machines/inventoryinsights/vulnerabilities
Microsoft.OffAzure/vmwareSites/machines/inventoryinsights/pendingupdates/*Every operation under Microsoft.OffAzure/vmwareSites/machines/inventoryinsights/pendingupdates

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 "Azure Migrate Execute Expert" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Azure Migrate Execute Expert" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, '1cfa4eac-9a23-481c-a793-bfb6958e836b')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1cfa4eac-9a23-481c-a793-bfb6958e836b')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "1cfa4eac-9a23-481c-a793-bfb6958e836b"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other migration roles

Find the smallest role for a task →