[5/21/2024] Installation steps have been updated to use the released version of Azure CLI and Azure PowerShell
[7/7/2024] Added links to documentation to enable/disable login experience and minor edits
“You never get a second chance to make a first impression” said Will Rogers, this also applies to the Azure CLI and Azure PowerShell with the first command to execute. After hearing from our customers, our team spent the last few months improving the first experience of the Azure client tools.
The new experience prioritizes access to usable information and shorter path to selecting your subscription.
Why a better interface?
We constantly aggregate and monitor the information we collect via GitHub, surveys and direct interviews to understand our customer’s main pain point. Last year, we determined that the login experience with our command line tools was an important source of dissatisfaction and decided to address it.
We started by interviewing several customers with different profiles and based in several geographies to understand the type of issues that they were facing when login in to Azure using Azure CLI or Azure PowerShell.
This investigation revealed that the growing use of multiple tenants and subscriptions by our customers does not work well anymore with the initial design of the login flow. Today, after logging in, many customers are unsure which subscription/tenant they are using and must take extra steps to ensure they are targeting the right environment. To avoid confusion about the tenant and subscription used, some of our users refer to an offline list of the IDs to use.
In the past, we implemented patches to minimize the effects of the multiplication of Azure contexts, like setting your default login subscription but we never looked at the interactive experience.
The new experience that we are revealing in preview is the result of the collaboration of user researchers, designers, developers, and product managers, we hope that you will like it.
If you encounter any issue, please create a GitHub issue:
- Azure CLI: https://github.com/Azure/azure-cli/issues/new/choose
- Azure PowerShell: https://aka.ms/azpsissue
Authentication update
Along the new login experience, Azure CLI and Azure PowerShell are using a more secure authentication mechanism. Initially available on Windows platforms, we are working with the MSAL team to expand this on other OSes that we support.
WAM is now enabled by default with Azure CLI and Azure PowerShell. Go to the following pages to read more about WAM:
- Azure PowerShell: https://learn.microsoft.com/powershell/azure/authenticate-interactive#web-account-manager-wam
- Azure CLI: https://learn.microsoft.com/cli/azure/authenticate-azure-cli-interactively#sign-in-with-web-account-manager-wam-on-windows
User experience improvements
Provide actionable information about available subscriptions
With the current practice, users needed extra commands to be able to select their subscription:
- Azure PowerShell: ‘Get-AzContext -ListAvailable’
Connect-AzAccount
- Azure CLI: ‘az account list’
The new practice provides the following information:
- Available subscriptions are displayed in alphabetical order during the login process.
-
Subscription name, subscription id and tenant domain name are provided for each subscription so that customers can manage multiple subscriptions in further steps.
-
Each combination is easily identifiable with an id.
Connect-AzAccount new experience
az login - new experience
Shorter Path to subscription selection
Currently customers must switch subscription by using extra command after login like `Set-AzContext` or `Select-AzContext` with Azure PowerShell or `az account set --subscription $subscriptionId` with Azure CLI.
Set-AzContext
With our new approach, we reduced the number of steps:
- Customers can select the subscription to use by typing its number during the login process without extra commands.
- The last used subscription will be identified with a star (*) in a different color and be the default selection in subsequent logins.
Select Tenant and subscription
Connect-AzAccount new with sub selection
az cli - new experience - step 2
Controlling the new login experience
If you need to fine tune the new login experience, please refer to our most up-to-date documentation:
- Azure PowerShell: https://learn.microsoft.com/powershell/azure/authenticate-interactive
- Azure CLI: https://learn.microsoft.com/cli/azure/authenticate-azure-cli-interactively
Getting started
Azure PowerShell
Install Az.Accounts version 3.0.0 or later.
# 1. Install Az.Accounts module with public preview features
Install-Module -Name Az.Accounts -MinimumVersion 3.0.0
# 2. Login to Azure
Connect-AzAccount
Azure CLI
Install Azure CLI version 2.61.0 or later.
Follow the instructions at the following location to install Azure CLI on your operating system: https://learn.microsoft.com/cli/azure/install-azure-cli
Feedback
Please report issues via GitHub as follows:
- Azure CLI: https://github.com/Azure/azure-cli/issues/new/choose
- Azure PowerShell: https://aka.ms/azpsissue
Thank you,
the Azure Client Tools team