kumar
kumar

Reputation: 9387

Azure CLI Get Current Subscription details

How do I find the current Azure subscription using Azure CLI.

az account list only gives me the list of subscriptions.

Upvotes: 29

Views: 42832

Answers (2)

Mwiza
Mwiza

Reputation: 8961

You can run : az account list -o table.

Outputs a list of resources in table form.

The details of your current subscription will be on line with IsDefault = True.

See the following example.enter image description here

Upvotes: 18

Joy Wang
Joy Wang

Reputation: 42063

You could use az account show to do it, if you do not specify the property, it gets the the details of the current subscription.

enter image description here

For more details, refer to this link.

Upvotes: 53

Related Questions