'Moving Azure DataFactory to another tenant

I am having an Azure DataFactory in my tenant,I have checked MSDN, they said they can move the DataFactory to another subscription but Can I move it to another Azure tenant ? Is it possible ? Or else can I download the Azure DataFactory and move it to the specified tenant using powershell or anything (Without downloading each and every jsons one by one) ?



Solution 1:[1]

You are correct that while ADF supports moving a data factory to a new subscription, Azure overall does not support moving resources between tenants. If however you are the service admin for the subscription, moving the subscription to the new tenant first may be an option for you.

In lieu of that option, @kapil's should work too, albeit by recreating the resource in the new subscription. The first option will not involve recreating resources.

Solution 2:[2]

You can Download the Azure data factory Project in Visual Studio from:

View > Cloud Explorer > Select Subscriptions > Data Factories > Select Datafactory

You need to Export and use the downloaded solution to Publish in any subscriptions you want.

Remember to ReAuthorize the Linkedsevice once deployed:

example image

Solution 3:[3]

Actually, moving the subscription from one tenant to another does work, does move the data factory to the new tenant, BUT the data factory still thinks it's in the old tenant.

If you look (in azure) the data factory's properties, you'll see (postmove) it still is in the old tenant. The data factory still kinda mostly works, but only mostly. you CANNOT grant it access to a keyvault that's in the new tenant. access is really handled by azure active directory, and the keyvault uses the new tenant's azure active directory, while the data factory is trying (and failing) to use the old tenant's azure active directory.

AFAIK, the only way out is to clone the data factory post-move. You can export out it's ARM template. You can test it out by renaming it in the parameter json file(s), add it in under the new name in the correct tenant, and it should be a clone. there might be some weirdnesses, and it's difficult to test it out since you no longer have a working version.

It might be best to not move the subscription (yet), export the original in the old tenant as json files (aka ARM template), then add it in the new subscription as-is. test it out, make appropriate tweaks, and you are good to go (unless you are moving subscriptions), then you might get a conflict since there would be now two data factories iwth the same name. I don't know about that one though.

Solution 4:[4]

Generate a arm template add varibles to it so it is interchangable. And then deploy the arm template with CLI.

This is the best/safest approach.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Brian Golden
Solution 2 Mihai Chelaru
Solution 3 user3622356
Solution 4 Eindbaas