-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Describe the bug
I upgraded to the latest azure cli and now cannot login. Keep getting a timeout error.
Related command
az login
Errors
Preparing to unpack .../azure-cli_2.74.0-1noble_amd64.deb ...noble) over (2.71.0-1
Unpacking azure-cli (2.74.0-1noble) ...noble) ...
Setting up azure-cli (2.74.0-1
Upgrading extensions
Checking update for account
Unable to get extension index.
Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='aka.ms', port=443): Max retries exceeded with url: /azure-cli-extension-index-v1 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f48c1b97080>, 'Connection to aka.ms timed out. (connect timeout=None)'))
Upgrade finished.You can enable auto-upgrade with 'az config set auto-upgrade.enable=yes'. More details in https://learn.microsoft.com/cli/azure/update-azure-cli#automatic-update
Issue script & Debug output
az login
CMD-LOG-LINE-BEGIN 10047 | 2025-06-13 18:04:58,277 | INFO | az_command_data_logger | command args: login --debug
CMD-LOG-LINE-BEGIN 10047 | 2025-06-13 18:09:48,754 | ERROR | az_command_data_logger | The command failed with an unexpected error. Here is the traceback:
CMD-LOG-LINE-BEGIN 10047 | 2025-06-13 18:09:48,757 | ERROR | az_command_data_logger | HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /organizations/v2.0/.well-known/openid-configuration (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f02287baa50>, 'Connection to login.microsoftonline.com timed out. (connect timeout=None)'))
Traceback (most recent call last):
File "/opt/az/lib/python3.12/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/opt/az/lib/python3.12/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.12/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/urllib3/connectionpool.py", line 404, in _make_request
self._validate_conn(conn)
File "/opt/az/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1060, in _validate_conn
conn.connect()
File "/opt/az/lib/python3.12/site-packages/urllib3/connection.py", line 363, in connect
self.sock = conn = self._new_conn()
^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/urllib3/connection.py", line 179, in _new_conn
raise ConnectTimeoutError(
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x7f02287baa50>, 'Connection to login.microsoftonline.com timed out. (connect timeout=None)')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/urllib3/connectionpool.py", line 829, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/urllib3/connectionpool.py", line 801, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/urllib3/util/retry.py", line 594, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /organizations/v2.0/.well-known/openid-configuration (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f02287baa50>, 'Connection to login.microsoftonline.com timed out. (connect timeout=None)'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 666, in execute
raise ex
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/command_modules/profile/custom.py", line 187, in login
subscriptions = profile.login(
^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/_profile.py", line 177, in login
user_identity = identity.login_with_auth_code(scopes=scopes, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/identity.py", line 166, in login_with_auth_code
result = self._msal_app.acquire_token_interactive(
^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/auth/identity.py", line 125, in _msal_app
self._msal_app_instance = PublicClientApplication(self.client_id, **self._msal_public_app_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/msal/application.py", line 2008, in init
super(PublicClientApplication, self).init(
File "/opt/az/lib/python3.12/site-packages/msal/application.py", line 632, in init
self.authority = Authority(
^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/msal/authority.py", line 79, in init
openid_config = tenant_discovery(
^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/msal/authority.py", line 210, in tenant_discovery
resp = http_client.get(tenant_discovery_endpoint, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/msal/individual_cache.py", line 273, in wrapper
value = function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/msal/throttled_http_client.py", line 96, in get
return NormalizedResponse(self.http_client.get(*args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/requests/adapters.py", line 688, in send
raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /organizations/v2.0/.well-known/openid-configuration (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f02287baa50>, 'Connection to login.microsoftonline.com timed out. (connect timeout=None)'))
CMD-LOG-LINE-BEGIN 10047 | 2025-06-13 18:09:48,758 | INFO | az_command_data_logger | exit code: 1
Expected behavior
expecting to be redirected to a web browser to login
Environment Summary
azure-cli 2.74.0
core 2.74.0
telemetry 1.1.0
Extensions:
account 0.2.5
Dependencies:
msal 1.32.3
azure-mgmt-resource 23.3.0
Python location '/opt/az/bin/python3'
Config directory '/home/brandon/.azure'
Extensions directory '/home/brandon/.azure/cliextensions'
Python (Linux) 3.12.10 (main, May 27 2025, 09:12:37) [GCC 13.3.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
tried multiple times even rebooted my machine