Azure Cli how to change subscription default

chemitaxis picture chemitaxis · Jul 20, 2016 · Viewed 53.4k times · Source

I have 3 subscription in my Azure Account, I need to change the default subscription. When i Run the command:

azure account list 

I have this output:

enter image description here

I have tried to change the default or current subscription on this way, with no results...

azure config set subscription {{MyIdSubscription}}

Any ideas? Thanks.

Answer

Ida picture Ida · Jan 6, 2017

For Azure CLI 2.0 (preview) I had to use

az account set --subscription <name or id>