2021-07-18 13:54:54 +05:30
|
|
|
# az account
|
|
|
|
|
|
|
|
> Manage Azure subscription information.
|
2023-10-15 09:42:29 +02:00
|
|
|
> Part of `azure-cli` (also known as `az`).
|
2022-10-04 20:36:23 +05:30
|
|
|
> More information: <https://learn.microsoft.com/cli/azure/account>.
|
2021-07-18 13:54:54 +05:30
|
|
|
|
2024-01-31 00:55:19 -03:00
|
|
|
- List all subscriptions for the logged in account:
|
2021-07-18 13:54:54 +05:30
|
|
|
|
|
|
|
`az account list`
|
|
|
|
|
|
|
|
- Set a `subscription` to be the currently active subscription:
|
|
|
|
|
2025-05-11 20:07:11 +03:00
|
|
|
`az account set {{[-s|--subscription]}} {{subscription_id}}`
|
2021-07-18 13:54:54 +05:30
|
|
|
|
|
|
|
- List supported regions for the currently active subscription:
|
|
|
|
|
|
|
|
`az account list-locations`
|
|
|
|
|
|
|
|
- Print an access token to be used with `MS Graph API`:
|
|
|
|
|
|
|
|
`az account get-access-token --resource-type {{ms-graph}}`
|
|
|
|
|
|
|
|
- Print details of the currently active subscription in a specific format:
|
|
|
|
|
2025-05-11 20:07:11 +03:00
|
|
|
`az account show {{[-o|--output]}} {{json|tsv|table|yaml}}`
|