Looking for something?

Azure Resource Manager - Part 6 - Move Azure Resources from one Resource Group to another

In the past recent months I've been turning inside out on various parts of Azure, including the Azure Resource Manager (ARM) and what it offers.

If you're looking for the basics of getting started, please check out the other posts in this article series. Start here.


I love how we can work with resources in Resource Groups, and keep them grouped for easy findability, configuration and manageability.

One of the things I've been looking for is an automatic way to move resources between my resource groups.

Moving Azure Resources between Resource Groups using REST

In this post we'll quickly check out how to do just that, using the ARM REST API.

Use the Azure Resource Manager REST Api to move resources from one Resource Group to another

I dug into the REST API's for Azure Resource Manager and found that there's now an endpoint for doing this, and it's very straight forward.

The request should be done to the /resourceGroups/<groupName>/moveResources endpoint, which could look like this (replace subscription Id and resource group name with your own:

The POST request

This is a sample of what the POST request endpoint would look like. Replace the SUBSCRIPTIONGUID and RESOURCEGROUPNAME with your own.

POST https://management.azure.com/subscriptions/SUBSCRIPTIONGUID/resourceGroups/Resource-Group-A/moveResources?api-version=2014-04-01  

JSON Payload

The payload needs to look like this in your POST request, where you specify the targetResourceGroup for where to move the resources, and any resources to move:

  "targetResourceGroup": "/subscriptions/SUBSCRIPTIONGUID/resourceGroups/ZimmersNewResourceGroup",
  "resources": [


Pose that we have Resource-Group-A and Resource-Group-B. Resource Group B is empty at the moment, but Resource Group A contains our resources that we want to move:

Resource Group A contains resources

We have two Azure Storage Accounts: zimmerstorage123 and zimmerstorage234. Here's what that exact request would look like in order to move from A to B:

POST https://management.azure.com/subscriptions/c6f21dec-a9b3-4ed9-88b7-946549cb2300/resourceGroups/Resource-Group-A/moveResources?api-version=2014-04-01

  "targetResourceGroup": "/subscriptions/c6f21dec-a9b3-4ed9-88b7-946549cb2300/resourceGroups/Resource-Group-B",
  "resources": [

The POST request is targeting Resource-Group-A and in the payload we select the Resource-Group-B as a targetResourceGroup for the resources.

The status of the destination resource group is changed to Moving Resources as expected. After a short while (or a long while, should you have a lot of resources), they now live in your new resource group:

Resource Group B is letting us know that the resources are moving

The result is as expected, that our resources now exist in Resource-Group-B instead of A. Voila, it's that easy.

Resource Group B has the new resources

Feel free to drop any comments or questions in the comments section.

0 Comments 11 May 2016
Tobias Zimmergren

Tobias Zimmergren

Hi, I'm Tobias. I am a Microsoft MVP for SharePoint and I use this site to share my thoughts on tech with you on topics like SharePoint, Office 365, Azure and general web development.

  Malmö, Sweden

Related Post

Comments powered by Disqus