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

Azure Local Migrate Execute ExpertAzure built-in role

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

Role ID1cfa4eac-9a23-481c-a793-bfb6958e836c
CategoryMigration
Actions40 (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/deployments/validate/actionValidates a deployment.
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.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.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.AzureStackHCI/*/ReadAny read operation on anything under Microsoft.AzureStackHCI
Microsoft.AzureStackHCI/LogicalNetworks/join/actionJoins logical networks resource
Microsoft.AzureStackHCI/NetworkInterfaces/*Every operation under Microsoft.AzureStackHCI/NetworkInterfaces
Microsoft.AzureStackHCI/VirtualHardDisks/*Every operation under Microsoft.AzureStackHCI/VirtualHardDisks
Microsoft.AzureStackHCI/VirtualMachines/WriteCreates/Updates virtual machine resource
Microsoft.AzureStackHCI/VirtualMachineInstances/WriteCreates/Updates virtual machine instance resource
Microsoft.DataReplication/*/readAny read operation on anything under Microsoft.DataReplication
Microsoft.DataReplication/replicationVaults/protectedItems/*Every operation under Microsoft.DataReplication/replicationVaults/protectedItems
Microsoft.DataReplication/replicationVaults/replicationExtensions/*Every operation under Microsoft.DataReplication/replicationVaults/replicationExtensions
Microsoft.DataReplication/replicationVaults/replicationPolicies/*Every operation under Microsoft.DataReplication/replicationVaults/replicationPolicies
Microsoft.ExtendedLocation/customLocations/readGets an Custom Location resource
Microsoft.KubernetesConfiguration/extensions/readGets extension instance resource.
Microsoft.ResourceConnector/appliances/readGets an Appliance resource
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 Local Migrate Execute Expert" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Azure Local 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-bfb6958e836c')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1cfa4eac-9a23-481c-a793-bfb6958e836c')
    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-bfb6958e836c"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other migration roles

Find the smallest role for a task →