How to change country or region on your Azure account

It might not be a common issue for everyone, but I was travelling a lot in my life, and at some point when I was in New Zealand – I happened to create an Azure account to use with my MSDN offer, and it was created in NZD. It was fine until I moved to Ireland, and now, to keep the books tidy, I wanted to change my currency to EUR.

Microsoft docos and support stand firm that this is not possible to change your billing profile residency. However, looking under the hood, it appears to be possible with some digging in and PowerShell magic.

First and foremost – you need to remove your account from the default tenant that was created for you the first time you activated any of your subscriptions. It looks like – youremailaddress.onmicrosoft.com – like JohnGmail.onmicrosoft.com

So the first step is to create a local AAD user to be able to run Az and MSOL commands against the tenant as this is not possible with a personal guest account.

Then, grant this user the Global Administrator rights and Access management after you log in with it with GA rights.

Then, it’s time to remove the tenant and to do so run through all advised steps on the removal blade. Don’t forget to remove your personal account prior to tenant removal.

TRIPLE-CHECK THAT YOU HAVE GA RIGHTS BEFORE ANY REMOVAL, AS YOU MIGHT LOST ALL ACCESS

Go to the manage tenants tab and follow the wizard.

You will probably see this error after getting all green checkmarks:

To sort it run the following commands with your admin account:

#Install the MSOnline Module
Install-Module -Name MSOnline
#Connect and Sign into your Tenant with a Global Admin
connect-msolservice 
#Loop through and delete all Service Principals
Get-MsolServicePrincipal -All | Remove-MsolServicePrincipal


#install AZ Modules
Install-Module -Name Az.Resources
Install-Module -Name Az.Accounts
#Connect and Sign into your Tenant with a Global Admin
Connect-AzAccount 
#Loop through and delete all Service Principals
Get-AzADServicePrincipal | ForEach-Object { Remove-AzADServicePrincipal -ObjectId $_.Id -Force}

After that you should be golden to remove your tenant:

Then wait… For me, it was about 30 minutes to get into some shadow MS tenant where you transferred if your account is not a member of any tenant. Plus I also had to flush cookies.

And then – voilà! No tenant is displayed! Rock!

Then go back to your VS benefits portal and activate your MSDN Subscription again. During that – you’ll get to the desired wizard where you can fill in your residency details again and a shiny new tenant with the right currency.

Hell yeah!

Links:
https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/change-azure-account-profile#update-your-country-or-region
https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/directory-delete-howto#remove-enterprise-apps-that-you-cant-delete

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.