Moving your Azure subscription to another tenant
Tags: azure, azuread, cloud
Published: 2022-04-29 01:51:31

#Scenario

I have an Azure subscription attached to my university email which I mainly use just as a sandpit to try new things out on. Microsoft offers a $100 [credit](https://azure.microsoft.com/en-au/free/students/) if you have an email from an eligible educational institution. These are handy because you have a year instead of 30 days to use it.

Unfortunately, these student subscriptions are attached to your university Azure AD tenant which sensibly - many unis are not going to give you any access to do much on.

That means I couldn't try things which required say creating app registrations or turning on P1 or P2 licenses.

This article will explain how to move this subscription over to your own tenant where you'll have full control of Azure AD. You'll still be able to have your $100 credit too and you'll still be able to access the subscription using your university credentials.

#Prerequisites

You'll need a subscription with Owner access and you'll need a tenant you want to move this subscription to. There's various ways to do this - the easiest is to just create a new Azure [free account](https://azure.microsoft.com/en-us/free/).

#Adding your uni account as a guest on destination tenant

Your university account needs to be a user in both tenants, so go to Azure AD and invite them in as a guest user. Your university mailbox will get an email where you'll need to accept the invite.

![Add guest user](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1pi06xqer8c9jqfdljy2.png)

You should also grant your university account global admin access too.

![Global admin access](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ah3xsjg2iz2zdds8435f.png)
 

#Change directory of subscription

Once access is granted, your university mailbox is now a user in both tenants. It's time to go to the subscription and click on Change Directory and select the new tenant.

![Change Directory](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1rzwa6l57vfctorsf02i.png)
 
Once you click 'Change', be aware that it may take some time to cascade.


#Verify it all works

After a little while, you're going to find the subscription will have disappeared. If you go and Switch Directory to your new tenant and you should see it.

On the Subscription overview page, you should see the Directory is now your new tenant.

![Directory](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qztabffnxh8fo4qikh3b.png)
 
Go ahead and try to create a new resource. You should be able to indicating you still have your $100 credit.

#Further reading

Note, there are some caveats which may be problematic if you were moving anything more than a sandpit subscription. For example, role assignments aren't migrated across and I've encountered problems with key vaults.

See the official documentation for more information about how Change Directory works [here](https://docs.microsoft.com/en-us/azure/role-based-access-control/transfer-subscription).

Further note - I'm not sure what'll happen but I would suggest not using the Transfer Ownership option. I haven't tried it but if you transfer ownership out of your university mailbox, it might alter the subscription type so you no longer get that $100 credit.