Skip to content

Commit 427dded

Browse files
committed
format the article
1 parent b2139c1 commit 427dded

File tree

1 file changed

+56
-55
lines changed

1 file changed

+56
-55
lines changed

articles/azure-resource-manager/management/move-resource-group-and-subscription.md

Lines changed: 56 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Move Azure resources to a new resource group or subscription
33
description: Learn how to move resources to a new resource group or subscription, and understand the steps to ensure a successful move operation.
44
ms.topic: conceptual
5-
ms.date: 02/11/2025
5+
ms.date: 07/29/2025
66
ms.custom: devx-track-azurecli, devx-track-azurepowershell, devx-track-arm-template, devx-track-python
77
content_well_notification:
88
- AI-contribution
@@ -36,34 +36,35 @@ Some important steps precede moving a resource. You can avoid errors if you veri
3636

3737
1. The source and destination subscriptions must exist within the same [Microsoft Entra tenant](../../active-directory/develop/quickstart-create-new-tenant.md). Use the Azure CLI or PowerShell to check that both subscriptions have the same tenant ID.
3838

39-
# [Azure CLI](#tab/azure-cli)
40-
41-
```azurecli-interactive
42-
az account show --subscription <your-source-subscription> --query tenantId
43-
az account show --subscription <your-destination-subscription> --query tenantId
44-
```
45-
46-
# [Azure PowerShell](#tab/azure-powershell)
47-
48-
```azurepowershell-interactive
49-
(Get-AzSubscription -SubscriptionName <your-source-subscription>).TenantId
50-
(Get-AzSubscription -SubscriptionName <your-destination-subscription>).TenantId
51-
```
52-
53-
---
54-
55-
If the tenant IDs for the source and destination subscriptions don't match, use the following methods to reconcile them:
56-
57-
- [Transfer billing ownership of an Azure subscription](../../cost-management-billing/manage/billing-subscription-transfer.md#transfer-billing-ownership-of-an-azure-subscription).
58-
- [Associate or add an Azure subscription to your Microsoft Entra tenant](../../active-directory/fundamentals/active-directory-how-subscriptions-associated-directory.md).
39+
# [Azure CLI](#tab/azure-cli)
40+
41+
```azurecli-interactive
42+
az account show --subscription <your-source-subscription> --query tenantId
43+
az account show --subscription <your-destination-subscription> --query tenantId
44+
```
45+
46+
# [Azure PowerShell](#tab/azure-powershell)
47+
48+
```azurepowershell-interactive
49+
(Get-AzSubscription -SubscriptionName <your-source-subscription>).TenantId
50+
(Get-AzSubscription -SubscriptionName <your-destination-subscription>).TenantId
51+
```
52+
53+
---
54+
55+
If the tenant IDs for the source and destination subscriptions don't match, use the following methods to reconcile them:
56+
57+
- [Transfer billing ownership of an Azure subscription](../../cost-management-billing/manage/billing-subscription-transfer.md#transfer-billing-ownership-of-an-azure-subscription).
58+
- [Associate or add an Azure subscription to your Microsoft Entra tenant](../../active-directory/fundamentals/active-directory-how-subscriptions-associated-directory.md).
5959

6060
1. To move resources to or from a Cloud Solution Provider (CSP) partner, see [Transfer Azure subscriptions between subscribers and CSPs](../../cost-management-billing/manage/transfer-subscriptions-subscribers-csp.yml).
6161

6262
1. The resources you want to move must support the move operation. For a list of which resources support move operations, see [Azure resource types for move operations](move-support-resources.md).
6363

6464
1. Some services have specific limitations or requirements when moving resources. Check the following move guidance before moving resources within these services:
6565

66-
- If you're using Azure Stack Hub, you can't move resources between groups.
66+
- If you're using Azure Stack Hub, you can't move resources between groups.
67+
6768
- [Azure App Services](./move-limitations/app-service-move-limitations.md)
6869
- [Azure DevOps Services](/azure/devops/organizations/billing/change-azure-subscription?toc=/azure/azure-resource-manager/toc.json)
6970
- [Classic deployment model](./move-limitations/classic-model-move-limitations.md) for classic compute, storage, virtual networks, and cloud services
@@ -75,54 +76,54 @@ Some important steps precede moving a resource. You can avoid errors if you veri
7576

7677
1. The destination subscription must be registered for the resource provider of the resource you're moving. If it's not, you receive an error stating that the **subscription isn't registered for a resource type**. You might see this error when moving a resource to a new subscription, but you didn't previously use the resource type in the subscription.
7778

78-
# [Azure CLI](#tab/azure-cli)
79+
# [Azure CLI](#tab/azure-cli)
7980

80-
To get the registration status:
81+
To get the registration status:
8182

82-
```azurecli-interactive
83-
az account set -s <destination-subscription-name-or-id>
84-
az provider list --query "[].{Provider:namespace, Status:registrationState}" --out table
85-
```
83+
```azurecli-interactive
84+
az account set -s <destination-subscription-name-or-id>
85+
az provider list --query "[].{Provider:namespace, Status:registrationState}" --out table
86+
```
8687

87-
To register a resource provider:
88+
To register a resource provider:
8889

89-
```azurecli-interactive
90-
az provider register --namespace Microsoft.Batch
91-
```
90+
```azurecli-interactive
91+
az provider register --namespace Microsoft.Batch
92+
```
9293

93-
# [Azure PowerShell](#tab/azure-powershell)
94+
# [Azure PowerShell](#tab/azure-powershell)
9495

95-
To get the registration status:
96+
To get the registration status:
9697

97-
```azurepowershell-interactive
98-
Set-AzContext -Subscription <destination-subscription-name-or-id>
99-
Get-AzResourceProvider -ListAvailable | Select-Object ProviderNamespace, RegistrationState
100-
```
98+
```azurepowershell-interactive
99+
Set-AzContext -Subscription <destination-subscription-name-or-id>
100+
Get-AzResourceProvider -ListAvailable | Select-Object ProviderNamespace, RegistrationState
101+
```
101102

102-
To register a resource provider:
103+
To register a resource provider:
103104

104-
```azurepowershell-interactive
105-
Register-AzResourceProvider -ProviderNamespace Microsoft.Batch
106-
```
105+
```azurepowershell-interactive
106+
Register-AzResourceProvider -ProviderNamespace Microsoft.Batch
107+
```
107108

108-
---
109+
---
109110

110111
1. Before starting a move operation, check the subscription quota for the subscription to which you're moving resources. Verify if you can request an increase in a quota that would cause a destination subscription to exceed its limit. For detailed guidance about limits and how to request an increase, see [Azure subscription and service limits, quotas, and constraints](../../azure-resource-manager/management/azure-subscription-service-limits.md).
111112

112113
1. The account moving the resources must have at least the following permissions:
113114

114-
- At the source resource group: **Microsoft.Resources/subscriptions/resourceGroups/moveResources/action**
115-
- At the destination resource group: **Microsoft.Resources/subscriptions/resourceGroups/write**
115+
- At the source resource group: **Microsoft.Resources/subscriptions/resourceGroups/moveResources/action**
116+
- At the destination resource group: **Microsoft.Resources/subscriptions/resourceGroups/write**
116117

117118
1. If you move a resource with an active Azure role assignment (or its child resource with this same assignment), the role assignment doesn't move and becomes orphaned. You must create the role assignment again after the move. Although the system automatically removes the orphaned role assignment, we recommend that you remove it before the move.
118119

119-
To learn more about how to manage role assignments, see [List Azure role assignments](../../role-based-access-control/role-assignments-list-portal.yml#list-role-assignments-at-a-scope) and [Assign Azure roles](../../role-based-access-control/role-assignments-portal.yml).
120+
To learn more about how to manage role assignments, see [List Azure role assignments](../../role-based-access-control/role-assignments-list-portal.yml#list-role-assignments-at-a-scope) and [Assign Azure roles](../../role-based-access-control/role-assignments-portal.yml).
120121

121122
1. **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.** For example, a virtual machine with managed disks requires you to move the virtual machine, managed disks, and other dependent resources together.
122123

123-
If you're moving a resource to a new subscription, check if the resource has any dependent resources and if they're located in the same resource group. If the resources aren't in the same resource group, check if you can combine them into the same resource group. If you can, use one move operation across resource groups to consolidate all the resources into the same resource group.
124+
If you're moving a resource to a new subscription, check if the resource has any dependent resources and if they're located in the same resource group. If the resources aren't in the same resource group, check if you can combine them into the same resource group. If you can, use one move operation across resource groups to consolidate all the resources into the same resource group.
124125

125-
For more information, see [Scenario for move across subscriptions](#scenario-for-moving-across-subscriptions).
126+
For more information, see [Scenario for move across subscriptions](#scenario-for-moving-across-subscriptions).
126127

127128
## Scenario for moving across subscriptions
128129

@@ -142,23 +143,23 @@ Moving resources from one subscription to another is a three-step process. To il
142143

143144
1. Select the resources that you want to move. To move all of the resources, select the checkbox at the top of list. Or, select resources individually.
144145

145-
:::image type="content" source="./media/move-resource-group-and-subscription/select-resources-to-move.png" alt-text="Screenshot of the Azure portal showing the selection of resources to move.":::
146+
:::image type="content" source="./media/move-resource-group-and-subscription/select-resources-to-move.png" alt-text="Screenshot of the Azure portal showing the selection of resources to move.":::
146147

147148
1. Select the **Move** button.
148149

149-
:::image type="content" source="./media/move-resource-group-and-subscription/select-move.png" alt-text="Screenshot of the Azure portal displaying the Move button with three options.":::
150+
:::image type="content" source="./media/move-resource-group-and-subscription/select-move.png" alt-text="Screenshot of the Azure portal displaying the Move button with three options.":::
150151

151-
This button gives you three options:
152+
This button gives you three options:
152153

153-
- Move to a new resource group.
154-
- Move to a new subscription.
155-
- Move to a new region. To change regions, see [Move resources across regions (from resource group) with Azure Resource Mover](../../resource-mover/move-region-within-resource-group.md?toc=/azure/azure-resource-manager/management/toc.json).
154+
- Move to a new resource group.
155+
- Move to a new subscription.
156+
- Move to a new region. To change regions, see [Move resources across regions (from resource group) with Azure Resource Mover](../../resource-mover/move-region-within-resource-group.md?toc=/azure/azure-resource-manager/management/toc.json).
156157

157158
1. Select if you're moving the resources to a new resource group or subscription.
158159

159160
1. The source resource group sets automatically. Specify the destination resource group. If you're moving to a new subscription, specify this option. Select **Next**.
160161

161-
:::image type="content" source="./media/move-resource-group-and-subscription/select-destination-group.png" alt-text="Screenshot of the Azure portal where the user specifies the destination resource group for the move operation.":::
162+
:::image type="content" source="./media/move-resource-group-and-subscription/select-destination-group.png" alt-text="Screenshot of the Azure portal where the user specifies the destination resource group for the move operation.":::
162163

163164
1. The portal validates that the resources can be moved. Wait for validation to complete.
164165

0 commit comments

Comments
 (0)