1

I am trying to move some Azure resources from one subscription to another one. I have one Microsoft Account which is co-administrator in both source and target subscriptions.

I run Powershell and log in using the following commandlet:

Add-AzureRmAccount -TenantId "source tenant GUID"

Then I use

Move-AzureRmResource -ResourceId "id of the resource" -DestinationResourceGroupName "xxx" -SubscriptionId "target subscription GUID"

I am getting this error:

Move-AzureRmResource : LinkedAuthorizationFailed : The client has permission to perform 
action 'Microsoft.Resources/subscriptions/resourceGroups/write' on scope '/subscriptions/
xxx/resourceGroups/dotnetportal', however the linked subscription 'target subscription GUID' is not in 
current tenant 'source tenant GUID'.
juvchan
  • 6,113
  • 2
  • 22
  • 35
Tomáš Herceg
  • 1,595
  • 1
  • 13
  • 18
  • I am assuming that you cannot or don't want to move the entire subscription to a different AD? – SvenAelterman Feb 28 '16 at 02:34
  • Oh, is it possible? How can I do that? – Tomáš Herceg Feb 28 '16 at 13:37
  • You will need to do that from the account management. This article should help you out: https://azure.microsoft.com/en-us/documentation/articles/billing-subscription-transfer/ – SvenAelterman Feb 28 '16 at 13:47
  • Afterwards, the command you tried should work – SvenAelterman Feb 28 '16 at 13:48
  • Thanks, I tried to transfer the migration however I didn't finished it. I have that I'll lose my BizSpark credits if I proceed. Is there any other way to transfer only some resources to a different subscription with different tenant? When I submitted a support request they told me that they can only transfer whole subscription. – Tomáš Herceg Feb 28 '16 at 14:59

3 Answers3

2

Can't reproduce your question and no official material found, but according to the error message however the linked subscription 'target subscription GUID' is not in current tenant 'source tenant GUID', I think resources moving between subscriptions belong to different tenant is not allowed. Microsoft Azure should have limited the function within identical tenant.

Derek
  • 827
  • 1
  • 6
  • 8
  • 1
    Have confirmed. Moving resources across tenant is not supported. For a cross subscription move, the target subscription must exist in an enabled state within the same tenant as the source subscription. – Derek Mar 04 '16 at 03:01
2

The Azure PowerShell module Move-AzureRmResource cmdlet allows you to move a resource to a different resource group or subscription, but it requires the subscriptions to be in the same tenant.

The best way to check if you have linked subscription is using UI, first.

  1. Login to your source azure subscription.
  2. Browse > Resource groups and select the resource group that contains the VM.
  3. In the Resource group blade, select Move from the menu.
  4. Check if you can see the linked subscription.

A good workaround to copy or move a resource group from one subscription to another see: https://blogs.msdn.microsoft.com/azuregov/2016/12/09/copying-azure-resource-groups-between-different-azure-subscriptions-or-environments/

Clavin Fernandes
  • 724
  • 7
  • 10
0

Share you some code as reference:

Get-AzureRMResource -ResourceName **** -ResourceGroupName **** | 
        Move-AzureRMResource -DestinationResourceGroupName *** -DestinationSubscriptionId **** -Force
Lily_user4045
  • 795
  • 4
  • 11
  • Thank you for help, I really appreciate it, but this doesn't answer my question. I know that the subscriptions is not on the same tenants, I have mentioned it in the title of the question. The problem is that I don't know how to deal with this situation. Also, my code sample is complete because I am using -ResourceId parameter so I don't need to use Get-AzureRMResource. – Tomáš Herceg Mar 01 '16 at 21:20
  • sorry, I didn't understand your question clearly before. It is authority issue, you need to add one subscription to the AD of your another subscription, and click it into profile page, scroll to bottom, set `Settings>Allow the user to sign in and access services?` as Allow. – Lily_user4045 Mar 02 '16 at 10:45
  • If your account has 2 subscriptions, the 2 subscriptions can move resources with each other . – Lily_user4045 Mar 03 '16 at 08:29