Set your Azure default Subscription to simplify the login

We are in 2021 and most companies have somewhat started to use some cloud services. Might it be only for E-Mail, or Google Maps or the likes of Azure – nowadays it is almost everywhere. After some time, you might even end-up with multiple subscriptions and always end-up with the wrong one when logging into the Azure Portal… does this sound familiar huh?

Of course, you can easily change the subscription or use features like “Filter by directory”. However, there is also a way to permanently change this and set your new default subscription.

For this, I use Azure CLI which can be downloaded here. I used the CLI from a Windows Command Prompt. To change the subscription, open a Command Prompt and login to your subscription by typing az login

Then you want to get a list of all the available subscriptions with your account: az account list. Pay attention to the “isDefault” value, this is probably set to “false” for your subscription, right?

To change the subscription, you can use the subscription name or better the ID:

Subscription Name: az account set --subscription "MSDN Azure Subscription"


Subscription ID: az account set -s “a3b303c4-6120-4313-be66-f5b5af2a3cg4”

After this, the “MSDN” subscription has become my new default subscription. Very simple and straight forward and will save you 10 seconds from now on after every login.


4 thoughts on “Set your Azure default Subscription to simplify the login”

Leave a Comment

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