Describe the bug
az login hangs there forever
Related command
az login --debug
cli.knack.cli: Command arguments: ['login', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f773ef437e0>, <function OutputProducer.on_global_arguments at 0x7f773ec8e7a0>, <function CLIQuery.on_global_arguments at 0x7f773ecd3ce0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'login': ['azure.cli.command_modules.profile']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: profile 0.001 2 8
cli.azure.cli.core: Total (1) 0.001 2 8
cli.azure.cli.core: Loaded 2 groups, 8 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : login
cli.azure.cli.core: Command table: login
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f773de38220>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/user/.azure/commands/2025-04-09.13-49-54.login.406.log'.
az_command_data_logger: command args: login --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7f773de94720>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7f773de96f20>, <function register_cache_arguments..add_cache_arguments at 0x7f773de97060>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7f773de97100>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f773ec8e840>, <function CLIQuery.handle_query_parameter at 0x7f773ecd3d80>, <function register_ids_argument..parse_ids_arguments at 0x7f773de96fc0>]
cli.azure.cli.core.auth.persistence: build_persistence: location='/home/user/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /home/user/.azure/msal_http_cache.bin
cli.azure.cli.core.auth.binary_cache: /home/user/.azure/msal_http_cache.bin not found. Using a fresh one.
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/organizations
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
Errors
hangs there forever
Issue script & Debug output
az login --debug
cli.knack.cli: Command arguments: ['login', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f773ef437e0>, <function OutputProducer.on_global_arguments at 0x7f773ec8e7a0>, <function CLIQuery.on_global_arguments at 0x7f773ecd3ce0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'login': ['azure.cli.command_modules.profile']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: profile 0.001 2 8
cli.azure.cli.core: Total (1) 0.001 2 8
cli.azure.cli.core: Loaded 2 groups, 8 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : login
cli.azure.cli.core: Command table: login
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f773de38220>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/user/.azure/commands/2025-04-09.13-49-54.login.406.log'.
az_command_data_logger: command args: login --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7f773de94720>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7f773de96f20>, <function register_cache_arguments..add_cache_arguments at 0x7f773de97060>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7f773de97100>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f773ec8e840>, <function CLIQuery.handle_query_parameter at 0x7f773ecd3d80>, <function register_ids_argument..parse_ids_arguments at 0x7f773de96fc0>]
cli.azure.cli.core.auth.persistence: build_persistence: location='/home/user/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /home/user/.azure/msal_http_cache.bin
cli.azure.cli.core.auth.binary_cache: /home/user/.azure/msal_http_cache.bin not found. Using a fresh one.
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/organizations
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
^Ccli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f773de384a0>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 190.820 seconds (init: 0.101, invoke: 190.719)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3608 in cache file under /home/user/.azure/telemetry/20250409135309349
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/az/bin/python3 /opt/az/lib/python3.12/site-packages/azure/cli/telemetry/init.py /home/user/.azure /home/user/.azure/telemetry/20250409135309349"
telemetry.process: Return from creating process 427
telemetry.main: Finish creating telemetry upload process.
Expected behavior
az login can succeed.
Environment Summary
azure-cli 2.71.0
core 2.71.0
telemetry 1.1.0
Dependencies:
msal 1.31.2b1
azure-mgmt-resource 23.1.1
Python location '/opt/az/bin/python3'
Config directory '/home/user/.azure'
Extensions directory '/home/user/.azure/cliextensions'
Python (Linux) 3.12.8 (main, Mar 25 2025, 10:55:23) [GCC 13.3.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response
Describe the bug
az login hangs there forever
Related command
az login --debug
cli.knack.cli: Command arguments: ['login', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f773ef437e0>, <function OutputProducer.on_global_arguments at 0x7f773ec8e7a0>, <function CLIQuery.on_global_arguments at 0x7f773ecd3ce0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'login': ['azure.cli.command_modules.profile']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: profile 0.001 2 8
cli.azure.cli.core: Total (1) 0.001 2 8
cli.azure.cli.core: Loaded 2 groups, 8 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : login
cli.azure.cli.core: Command table: login
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f773de38220>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/user/.azure/commands/2025-04-09.13-49-54.login.406.log'.
az_command_data_logger: command args: login --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7f773de94720>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7f773de96f20>, <function register_cache_arguments..add_cache_arguments at 0x7f773de97060>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7f773de97100>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f773ec8e840>, <function CLIQuery.handle_query_parameter at 0x7f773ecd3d80>, <function register_ids_argument..parse_ids_arguments at 0x7f773de96fc0>]
cli.azure.cli.core.auth.persistence: build_persistence: location='/home/user/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /home/user/.azure/msal_http_cache.bin
cli.azure.cli.core.auth.binary_cache: /home/user/.azure/msal_http_cache.bin not found. Using a fresh one.
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/organizations
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
Errors
hangs there forever
Issue script & Debug output
az login --debug
cli.knack.cli: Command arguments: ['login', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f773ef437e0>, <function OutputProducer.on_global_arguments at 0x7f773ec8e7a0>, <function CLIQuery.on_global_arguments at 0x7f773ecd3ce0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'login': ['azure.cli.command_modules.profile']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: profile 0.001 2 8
cli.azure.cli.core: Total (1) 0.001 2 8
cli.azure.cli.core: Loaded 2 groups, 8 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : login
cli.azure.cli.core: Command table: login
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f773de38220>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/user/.azure/commands/2025-04-09.13-49-54.login.406.log'.
az_command_data_logger: command args: login --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7f773de94720>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7f773de96f20>, <function register_cache_arguments..add_cache_arguments at 0x7f773de97060>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7f773de97100>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f773ec8e840>, <function CLIQuery.handle_query_parameter at 0x7f773ecd3d80>, <function register_ids_argument..parse_ids_arguments at 0x7f773de96fc0>]
cli.azure.cli.core.auth.persistence: build_persistence: location='/home/user/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /home/user/.azure/msal_http_cache.bin
cli.azure.cli.core.auth.binary_cache: /home/user/.azure/msal_http_cache.bin not found. Using a fresh one.
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/organizations
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
^Ccli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f773de384a0>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 190.820 seconds (init: 0.101, invoke: 190.719)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3608 in cache file under /home/user/.azure/telemetry/20250409135309349
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/az/bin/python3 /opt/az/lib/python3.12/site-packages/azure/cli/telemetry/init.py /home/user/.azure /home/user/.azure/telemetry/20250409135309349"
telemetry.process: Return from creating process 427
telemetry.main: Finish creating telemetry upload process.
Expected behavior
az login can succeed.
Environment Summary
azure-cli 2.71.0
core 2.71.0
telemetry 1.1.0
Dependencies:
msal 1.31.2b1
azure-mgmt-resource 23.1.1
Python location '/opt/az/bin/python3'
Config directory '/home/user/.azure'
Extensions directory '/home/user/.azure/cliextensions'
Python (Linux) 3.12.8 (main, Mar 25 2025, 10:55:23) [GCC 13.3.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response