az login not working or authentication issue in VS Code using azure-cli

If you’re having trouble with az login not working in VS Code using the Azure CLI in windows machine, here are some steps to troubleshoot and resolve the issue:

Step 1 : Log out of all active Azure accounts.

az account clear

Step 2: Disable Windows broker config of Azure.

az config set core.enable_broker_on_windows=false

Step 3: Log back into your Azure account.

az login

Step 4: After successful authentication if you are still facing authentication issues. Try below command to set tenant id and re login.

az login --tenant TENANT_ID

Leave a Reply

Your email address will not be published. Required fields are marked *