Source: Install Azure CLI on Ubuntu
If Azure CLI is already installed with version version
2.0.81
, this package is outdated and must be removed.
sudo apt remove azure-cli -y && sudo apt autoremove -y
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az login
Your browser will open and prompt you to enter your Azure login credentials. After successful authentication, your terminal will display your subscription information.
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code FXP4DEVX3 to authenticate.
[
{
"cloudName": "AzureCloud",
"homeTenantId": "3f7bc283-72c9-4132-ba12-7e2f2b183209",
"id": "60bc35fa-1ed3-4db3-b577-8de507555faa",
"isDefault": true,
"managedByTenants": [],
"name": "Abonnement Azure 1",
"state": "Enabled",
"tenantId": "3f7bc283-72c9-4132-ba12-7e2f2b183209",
"user": {
"name": "arnaudsene@hotmail.com",
"type": "user"
}
}
]