How to move resources to another subscription or resource group in Azure?

In this manual I am going to show you how to move resources to a different subscription, region and/or resource group in Azure. For today I am going to use the Azure portal, but you can use Azure PowerShell, Azure CLI or the REST API as well to move them.

Resource move Azure

Before you start

  • Most resources can be moved, but not all. Before you start moving it is good to verify wich resources can and cannot be moved. For a full list check the Microsoft docs page: Move operation support for resources
  • Some services have limitations in moving. Before you move these verify what to do:
  • If you move a resource that has an Azure role assigned directly to the resource (or a child resource), the role assignment isn’t moved and becomes orphaned. After the move, you must re-create the role assignment. Eventually, the orphaned role assignment is automatically removed, but we recommend removing the role assignment before the move.
  • The source and destination subscriptions must exist within the same Azure Active Directory tenant. To check that both subscriptions have the same tenant ID, use Azure PowerShell or Azure CLI.
  • For a move across subscriptions, the resource and its dependent resources must be located in the same resource group and they must be moved together.

Manual

STEP 1: Login to the Azure portal,

STEP 2: Only when you want to do a subscription move, if you want to move to another resource group or region go to step 3.

Open an Azure CLI window.

Azure CLI button

Run the following commands to verify if both subscriptions are both connected to the same Azure AD Tenant

(Get-AzSubscription -SubscriptionName "<your-source-subscription>").TenantId
(Get-AzSubscription -SubscriptionName "<your-destination-subscription>").TenantId

The result should look like this:

Azure CLI get subscription tenantid

STEP 3: In the Azure portal go to the resource group that you want to move resources from. For this example I am going to move a storage and an automation account to a different subscription. Select all resources that you want to move, and from the top menu select move and chose where you want to move them to.

Move to another subscription azure

Now select the net target subscription, and the new resource group, create one if needed.

move resources

The Azure Portal is now going to verify if resources are eligible for a resource move, this might take up a few minutes.

pending validation resource move

Wait untill the status has changed to succeeded and press next.

succeeded move validation

Final step is to move the resources!

move resources

Wait for the resource move to complete…

azure portal notification

When the move is completed, you can verify the newly created resource group to have te resources in the new subscription (2azure New)

new subscription after move

More information can be found on Microsoft Docs: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/move-resource-group-and-subscription

Add a Comment

Your email address will not be published. Required fields are marked *