Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az login --identity broken under 2.69.0 #30806

Closed
emoshaya opened this issue Feb 11, 2025 · 2 comments
Closed

az login --identity broken under 2.69.0 #30806

emoshaya opened this issue Feb 11, 2025 · 2 comments
Assignees
Labels
Account az login/account Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@emoshaya
Copy link

Describe the bug

Errors in 2.69.0 when running az login --identity. We are not getting these errors in 2.68.0

We can only attribute it to the profile changes in 2.69.0

Image

Related command

az login --identity

Errors

/usr/lib/python3/dist-packages/requests/__init__.py:87: RequestsDependencyWarning: urllib3 (1.26.5) or chardet (5.2.0) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Error loading command module 'batch': DATA_BATCH
Error loading command module 'keyvault': DATA_KEYVAULT_SECURITY_DOMAIN

Issue script & Debug output

cli.knack.cli: Command arguments: ['login', '--identity', '--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 0x7c9d3fc6b0a0>, <function OutputProducer.on_global_arguments at 0x7c9d3fbe7130>, <function CLIQuery.on_global_arguments at 0x7c9d3fc2c430>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Command index version or cloud profile is invalid or doesn't match the current command.
cli.azure.cli.core: Command index has been invalidated.
cli.azure.cli.core: No module found from index for '['login', '--identity', '--debug']'
cli.azure.cli.core: Loading all modules and extensions
cli.azure.cli.core: Discovered command modules: ['acr', 'acs', 'advisor', 'ams', 'apim', 'appconfig', 'appservice', 'aro', 'backup', 'batch', 'batchai', 'billing', 'botservice', 'cdn', 'cloud', 'cognitiveservices', 'compute_recommender', 'computefleet', 'config', 'configure', 'consumption', 'container', 'containerapp', 'cosmosdb', 'databoxedge', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'identity', 'interactive', 'iot', 'keyvault', 'lab', 'managedservices', 'maps', 'marketplaceordering', 'monitor', 'mysql', 'netappfiles', 'network', 'policyinsights', 'privatedns', 'profile', 'rdbms', 'redis', 'relay', 'resource', 'role', 'search', 'security', 'servicebus', 'serviceconnector', 'servicefabric', 'signalr', 'sql', 'sqlvm', 'storage', 'synapse', 'util', 'vm']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: acr                       0.715        36       149
cli.azure.cli.core: acs                       0.010        14        77
cli.azure.cli.core: advisor                   0.001         3         6
cli.azure.cli.core: ams                       0.004        22       100
cli.azure.cli.core: apim                      0.003        14        69
cli.azure.cli.core: appconfig                 0.002         9        47
cli.azure.cli.core: appservice                0.012        79       270
cli.azure.cli.core: aro                       0.013         1        10
cli.azure.cli.core: backup                    0.002        16        60
cli.azure.cli.core: Error loading command module 'batch': DATA_BATCH
cli.azure.cli.core: Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/__init__.py", line 259, in _update_command_table_from_modules
    module_command_table, module_group_table = _load_module_command_loader(self, args, mod)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/__init__.py", line 1147, in _load_module_command_loader
    return _load_command_loader(loader, args, mod, 'azure.cli.command_modules.')
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/__init__.py", line 1129, in _load_command_loader
    command_table = command_loader.load_command_table(args)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/command_modules/batch/__init__.py", line 29, in load_command_table
    load_command_table(self, args)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/command_modules/batch/commands.py", line 113, in load_command_table
    with self.command_group('batch job', get_data_type(), client_factory=get_data_factory()) as g:
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/command_modules/batch/commands.py", line 39, in get_data_type
    resource_type=ResourceType.DATA_BATCH
  File "/usr/lib/python3.10/enum.py", line 437, in __getattr__
    raise AttributeError(name) from None
AttributeError: DATA_BATCH

cli.azure.cli.core: batchai                   0.001        10        30
cli.azure.cli.core: billing                   0.005        19        52
cli.azure.cli.core: botservice                0.002        12        42
cli.azure.cli.core: cdn                       0.077         8        50
cli.azure.cli.core: cloud                     0.001         1         7
cli.azure.cli.core: cognitiveservices         0.001        10        33
cli.azure.cli.core: compute_recommender       0.001         1         1
cli.azure.cli.core: computefleet              0.004         1         1
cli.azure.cli.core: config                    0.001         2         7
cli.azure.cli.core: configure                 0.000         2         5
cli.azure.cli.core: consumption               0.007         8         9
cli.azure.cli.core: container                 0.004         2        17
cli.azure.cli.core: containerapp              0.046        37       123
cli.azure.cli.core: cosmosdb                  0.007        58       199
cli.azure.cli.core: databoxedge               0.003         5        28
cli.azure.cli.core: dls                       0.001         6        36
cli.azure.cli.core: dms                       0.002         3        22
cli.azure.cli.core: eventgrid                 0.003        25        96
cli.azure.cli.core: eventhubs                 0.003        13        20
cli.azure.cli.core: extension                 0.001         1         7
cli.azure.cli.core: feedback                  0.000         1         2
cli.azure.cli.core: find                      0.000         1         1
cli.azure.cli.core: hdinsight                 0.003         9        42
cli.azure.cli.core: identity                  0.001         2        11
cli.azure.cli.core: interactive               0.000         1         1
cli.azure.cli.core: iot                       0.055        19        82
cli.azure.cli.core: Error loading command module 'keyvault': DATA_KEYVAULT_SECURITY_DOMAIN
cli.azure.cli.core: Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/__init__.py", line 259, in _update_command_table_from_modules
    module_command_table, module_group_table = _load_module_command_loader(self, args, mod)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/__init__.py", line 1147, in _load_module_command_loader
    return _load_command_loader(loader, args, mod, 'azure.cli.command_modules.')
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/__init__.py", line 1126, in _load_command_loader
    command_loader = loader_cls(cli_ctx=loader.cli_ctx)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/command_modules/keyvault/__init__.py", line 15, in __init__
    from azure.cli.command_modules.keyvault._client_factory import keyvault_mgmt_client_factory
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/command_modules/keyvault/_client_factory.py", line 55, in <module>
    ResourceType.DATA_KEYVAULT_SECURITY_DOMAIN:
  File "/usr/lib/python3.10/enum.py", line 437, in __getattr__
    raise AttributeError(name) from None
AttributeError: DATA_KEYVAULT_SECURITY_DOMAIN

cli.azure.cli.core: lab                       0.013         9        30
cli.azure.cli.core: managedservices           0.004         3         8
cli.azure.cli.core: maps                      0.001         5        13
cli.azure.cli.core: marketplaceordering       0.001         1         2
cli.azure.cli.core: monitor                   0.332        18        61
cli.azure.cli.core: mysql                     0.866        16        56
cli.azure.cli.core: netappfiles               0.038         8        17
cli.azure.cli.core: network                   0.191       104       345
cli.azure.cli.core: policyinsights            0.030         9        17
cli.azure.cli.core: privatedns                0.014        14        60
cli.azure.cli.core: profile                   0.001         2         8
cli.azure.cli.core: rdbms                     0.110        51       212
cli.azure.cli.core: redis                     0.368         7        38
cli.azure.cli.core: relay                     0.022         7         8
cli.azure.cli.core: resource                  0.014        52       232
cli.azure.cli.core: role                      0.020        17        62
cli.azure.cli.core: search                    0.007         7        19
cli.azure.cli.core: security                  0.009        48        98
cli.azure.cli.core: servicebus                0.008        14        17
cli.azure.cli.core: serviceconnector          0.017        20       315
cli.azure.cli.core: servicefabric             0.012        27        80
cli.azure.cli.core: signalr                   0.003        10        42
cli.azure.cli.core: sql                       0.013        56       215
cli.azure.cli.core: sqlvm                     0.079         4        20
cli.azure.cli.core: storage                   0.528        59       274
cli.azure.cli.core: synapse                   0.026        54       246
cli.azure.cli.core: util                      0.001         3         7
cli.azure.cli.core: vm                        0.921        58       223
cli.azure.cli.core: Total (63)                4.637      1134      4437
cli.azure.cli.core: Loaded 1120 groups, 4437 commands.
cli.azure.cli.core: Updated command index in 0.131 seconds.
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7c9d3ef2c8b0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/ebrahim.moshaya/.azure/commands/2025-02-11.18-10-31.login.14863.log'.
az_command_data_logger: command args: login --identity --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7c9d3ef55510>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7c9d3ef7bb50>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7c9d3ef7bc70>, <function register_upcoming_breaking_change_info.<locals>.update_breaking_change_info at 0x7c9d3ef7bd00>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x7c9d3d3b2710>]
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7c9d3fbe71c0>, <function CLIQuery.handle_query_parameter at 0x7c9d3fc2c4c0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7c9d3ef7bbe0>]
cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/command_modules/profile/custom.py", line 146, in login
    return profile.login_with_managed_identity(
TypeError: Profile.login_with_managed_identity() got an unexpected keyword argument 'client_id'

cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: Profile.login_with_managed_identity() got an unexpected keyword argument 'client_id'
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/command_modules/profile/custom.py", line 146, in login
    return profile.login_with_managed_identity(
TypeError: Profile.login_with_managed_identity() got an unexpected keyword argument 'client_id'
az_command_data_logger: Profile.login_with_managed_identity() got an unexpected keyword argument 'client_id'
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/usr/local/lib/python3.10/dist-packages/azure/cli/command_modules/profile/custom.py", line 146, in login
    return profile.login_with_managed_identity(
TypeError: Profile.login_with_managed_identity() got an unexpected keyword argument 'client_id'

Expected behavior

It should allow us to login using the managed identity as described here: https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli-managed-identity

Environment Summary

azure-cli 2.69.0

Additional context

No response

@emoshaya emoshaya added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Feb 11, 2025
Copy link

Hi @emoshaya,

This is not the official Azure CLI published by Microsoft.

How to tell if the installed Azure CLI is unofficial:

Please follow https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux to install Microsoft official Azure CLI.

If you feel that further discussion is needed, please add a comment with the text /clibot unresolve to reopen the issue.

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 11, 2025

Thank you for opening this issue, we will look into it.

@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot Account az login/account labels Feb 11, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 11, 2025
@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Feb 11, 2025
@yonzhan yonzhan added this to the Backlog milestone Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Account az login/account Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants