Skip to content

az login and az --version very slow #27796

Description

@oshihirii

Describe the bug

Same issue described here:

#9852

I run:

az login

It returns:

A web browser has been opened at https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with `az login --use-device-code`.

My browser opens, I enter in my credentials, the browser message is "You have logged into Microsoft Azure!".

The message in the terminal stays the same, i.e:

A web browser has been opened at https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with `az login --use-device-code`.

When I run this in another terminal, nothing happens:

func azure functionapp publish MyFunctionAppName

This was initially going to be a bug report about az login not working, but it actually does work, if I leave the az login for several minutes.

Related command

az login and az --version

Errors

No errors

Issue script & Debug output

I am not running a script

Expected behavior

I expected that when browser shows login success, the terminal will show that az login completed successfully and I am logged in.

Environment Summary

even running az --version takes a very long time, it took about 2 minutes to return:

$ az --version
azure-cli                         2.53.1

core                              2.53.1
telemetry                          1.1.0

Dependencies:
msal                            1.24.0b2
azure-mgmt-resource             23.1.0b2

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\ME\.azure\cliextensions'

Python (Windows) 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal


Your CLI is up-to-date.

Additional context

No response

Metadata

Metadata

Labels

Accountaz login/accountAuto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions