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 artifacts universal download doesn't work with user assigned managed identities #26775

Open
JayDoubleu opened this issue Jun 28, 2023 · 10 comments · May be fixed by #26776
Open

az artifacts universal download doesn't work with user assigned managed identities #26775

JayDoubleu opened this issue Jun 28, 2023 · 10 comments · May be fixed by #26776
Labels
Artifacts az artifacts Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. DevOps Installation Service Attention This issue is responsible by Azure service team.
Milestone

Comments

@JayDoubleu
Copy link

JayDoubleu commented Jun 28, 2023

Describe the bug

az artifacts universal download doesn't seem to work with user assigned managed identities

Related command

az login --identity 
az artifacts universal download  --organization https://dev.azure.com/$org  --project="$project"  --scope project  --feed $feed  --name my-first-package  --version 0.0.1  --path $path

Errors

Failed to update Universal Packages tooling.
Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials. Please see https://aka.ms/azure-devops-cli-auth for more information.

cli.azext_devops.dev.common.services: trying to get token (temp) for tenant _redacted_ and user systemAssignedIdentity
cli.azext_devops.dev.common.services: not able to get token from az login
cli.azext_devops.dev.common.services: Tenant shouldn't be specified for managed identity account
Traceback (most recent call last):
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/services.py", line 157, in get_token_from_az_login
    raw = profile.get_raw_token(
  File "/home/azuser/.local/lib/python3.10/site-packages/azure/cli/core/_profile.py", line 368, in get_raw_token
    raise CLIError("Tenant shouldn't be specified for managed identity account")
knack.util.CLIError: Tenant shouldn't be specified for managed identity account

Issue script & Debug output

cli.knack.cli: Command arguments: ['artifacts', 'universal', 'download', '--organization', 'https://dev.azure.com/_redacted_/', '--project=_redacted_', '--scope', 'project', '--feed', '_redacted_', '--name', 'my-first-package', '--version', '0.0.1', '--path', '.', '--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 0x7ff1cc76b2e0>, <function OutputProducer.on_global_arguments at 0x7ff1cc6b2e60>, <function CLIQuery.on_global_arguments at 0x7ff1cc4e81f0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: No module found from index for '['artifacts', 'universal', 'download', '--organization', 'https://dev.azure.com/_redacted_/', '--project=_redacted_', '--scope', 'project', '--feed', '_redacted_', '--name', 'my-first-package', '--version', '0.0.1', '--path', '.', '--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', 'config', 'configure', 'consumption', 'container', 'cosmosdb', 'databoxedge', 'dla', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'identity', 'interactive', 'iot', 'keyvault', 'kusto', 'lab', 'managedservices', 'maps', 'marketplaceordering', 'monitor', '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.086        34       144
cli.azure.cli.core: acs                       0.013         6        48
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        11        60
cli.azure.cli.core: appconfig                 0.002         8        42
cli.azure.cli.core: appservice                0.031        73       260
cli.azure.cli.core: aro                       0.005         1         8
cli.azure.cli.core: backup                    0.013        16        58
cli.azure.cli.core: batch                     0.018        36       104
cli.azure.cli.core: batchai                   0.002        10        30
cli.azure.cli.core: billing                   0.004        19        52
cli.azure.cli.core: botservice                0.002        12        42
cli.azure.cli.core: cdn                       0.005        39       133
cli.azure.cli.core: cloud                     0.001         1         7
cli.azure.cli.core: cognitiveservices         0.002         8        31
cli.azure.cli.core: config                    0.001         2         7
cli.azure.cli.core: configure                 0.001         2         5
cli.azure.cli.core: consumption               0.001         8         9
cli.azure.cli.core: container                 0.005         1        11
cli.azure.cli.core: cosmosdb                  0.009        57       191
cli.azure.cli.core: databoxedge               0.003         5        27
cli.azure.cli.core: dla                       0.003        23        62
cli.azure.cli.core: dls                       0.002         7        41
cli.azure.cli.core: dms                       0.001         3        22
cli.azure.cli.core: eventgrid                 0.004        25        96
cli.azure.cli.core: eventhubs                 0.005        12        18
cli.azure.cli.core: extension                 0.001         1         7
cli.azure.cli.core: feedback                  0.000         1         2
cli.azure.cli.core: find                      0.001         1         1
cli.azure.cli.core: hdinsight                 0.004         8        39
cli.azure.cli.core: identity                  0.001         2        11
cli.azure.cli.core: interactive               0.000         1         1
cli.azure.cli.core: iot                       0.047        19        82
cli.azure.cli.core: keyvault                  0.006        22       131
cli.azure.cli.core: kusto                     0.001         3        14
cli.azure.cli.core: lab                       0.002        11        34
cli.azure.cli.core: managedservices           0.001         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.019        26        79
cli.azure.cli.core: netappfiles               0.004        17        94
cli.azure.cli.core: network                   0.305       101       324
cli.azure.cli.core: policyinsights            0.007         9        17
cli.azure.cli.core: privatedns                0.004        14        66
cli.azure.cli.core: profile                   0.001         2         9
cli.azure.cli.core: rdbms                     0.129        55       230
cli.azure.cli.core: redis                     0.002         5        27
cli.azure.cli.core: relay                     0.002        10        37
cli.azure.cli.core: resource                  0.008        47       209
cli.azure.cli.core: role                      0.002        17        61
cli.azure.cli.core: search                    0.002         7        22
cli.azure.cli.core: security                  0.004        48       104
cli.azure.cli.core: servicebus                0.006        13        15
cli.azure.cli.core: serviceconnector          0.009         8       129
cli.azure.cli.core: servicefabric             0.007        26        75
cli.azure.cli.core: signalr                   0.002         8        30
cli.azure.cli.core: sql                       0.012        55       207
cli.azure.cli.core: sqlvm                     0.028         4        20
cli.azure.cli.core: storage                   0.036        58       272
cli.azure.cli.core: synapse                   0.009        54       246
cli.azure.cli.core: util                      0.001         3         7
cli.azure.cli.core: vm                        0.033        58       265
cli.azure.cli.core: Total (63)                0.924      1167      4504
cli.azure.cli.core: Loaded 1157 groups, 4504 commands.
cli.azure.cli.core: Updated command index in 0.004 seconds.
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7ff1cb99a7a0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/azuser/.azure/commands/2023-06-28.21-35-02.unknown_command.19657.log'.
az_command_data_logger: command args: artifacts universal download --organization {} --project={} --scope {} --feed {} --name {} --version {} --path {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7ff1cb9af2e0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7ff1cba011b0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7ff1cba012d0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x7ff1cabd7eb0>]
cli.azure.cli.core._session: Failed to load or parse file /home/azuser/.azure/extensionCommandTree.json. It will be overridden by default settings.
urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443
urllib3.connectionpool: https://aka.ms:443 "GET /azExtCmdTree HTTP/1.1" 301 0
urllib3.connectionpool: Starting new HTTPS connection (1): azurecliextensionsync.blob.core.windows.net:443
urllib3.connectionpool: https://azurecliextensionsync.blob.core.windows.net:443 "GET /cmd-index/extensionCommandTree.json HTTP/1.1" 200 135010
The command requires the extension azure-devops. Do you want to install it now? The command will continue to run after the extension is installed. (Y/n): Y
cli.azure.cli.core.extension.dynamic_install: Run 'az config set extension.use_dynamic_install=yes_without_prompt' to allow installing extensions without prompt.
urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443
urllib3.connectionpool: https://aka.ms:443 "GET /azure-cli-extension-index-v1 HTTP/1.1" 301 0
urllib3.connectionpool: Starting new HTTPS connection (1): azcliextensionsync.blob.core.windows.net:443
urllib3.connectionpool: https://azcliextensionsync.blob.core.windows.net:443 "GET /index1/index.json HTTP/1.1" 200 2935242
cli.azure.cli.core.extension._resolve: Candidates ['azure_devops-0.12.0-py2.py3-none-any.whl', 'azure_devops-0.17.0-py2.py3-none-any.whl', 'azure_devops-0.21.0-py2.py3-none-any.whl', 'azure_devops-0.26.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_devops-0.12.0-py2.py3-none-any.whl', 'azure_devops-0.17.0-py2.py3-none-any.whl', 'azure_devops-0.21.0-py2.py3-none-any.whl', 'azure_devops-0.26.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_devops-0.12.0-py2.py3-none-any.whl', 'azure_devops-0.17.0-py2.py3-none-any.whl', 'azure_devops-0.21.0-py2.py3-none-any.whl', 'azure_devops-0.26.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_devops-0.12.0-py2.py3-none-any.whl', 'azure_devops-0.17.0-py2.py3-none-any.whl', 'azure_devops-0.21.0-py2.py3-none-any.whl', 'azure_devops-0.26.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Chosen {'downloadUrl': 'https://github.com/Azure/azure-devops-cli-extension/releases/download/20230127.2/azure_devops-0.26.0-py2.py3-none-any.whl', 'filename': 'azure_devops-0.26.0-py2.py3-none-any.whl', 'metadata': {'azext.minCliCoreVersion': '2.30.0', 'classifiers': ['Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License'], 'extensions': {'python.details': {'contacts': [{'email': '[email protected]', 'name': 'Microsoft', 'role': 'author'}], 'document_names': {'description': 'DESCRIPTION.rst'}, 'project_urls': {'Home': 'https://github.com/Microsoft/azure-devops-cli-extension'}}}, 'extras': [], 'generator': 'bdist_wheel (0.30.0)', 'license': 'MIT', 'metadata_version': '2.0', 'name': 'azure-devops', 'run_requires': [{'requires': ['distro (==1.3.0)']}], 'summary': 'Tools for managing Azure DevOps.', 'version': '0.26.0'}, 'sha256Digest': '565fc207f1740c26957f382fe2eefabec254011fb2d1b50c0e540f894f47dcbe'}
cli.azure.cli.core.extension.operations: Extension source is url? True
cli.azure.cli.core.extension.operations: Downloading https://github.com/Azure/azure-devops-cli-extension/releases/download/20230127.2/azure_devops-0.26.0-py2.py3-none-any.whl to /tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl
urllib3.connectionpool: Starting new HTTPS connection (1): github.com:443
urllib3.connectionpool: https://github.com:443 "GET /Azure/azure-devops-cli-extension/releases/download/20230127.2/azure_devops-0.26.0-py2.py3-none-any.whl HTTP/1.1" 302 0
urllib3.connectionpool: Starting new HTTPS connection (1): objects.githubusercontent.com:443
urllib3.connectionpool: https://objects.githubusercontent.com:443 "GET /github-production-release-asset-2e65be/107708057/8c8c37f1-25aa-4394-9b37-ab8655c6d437?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230628%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230628T213421Z&X-Amz-Expires=300&X-Amz-Signature=3d7d50fae321c5ce4a678fca6817029e6f1c7e9338fbfc790298587687786edd&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=107708057&response-content-disposition=attachment%3B%20filename%3Dazure_devops-0.26.0-py2.py3-none-any.whl&response-content-type=application%2Foctet-stream HTTP/1.1" 200 1195005
cli.azure.cli.core.extension.operations: Downloaded to /tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl
cli.azure.cli.core.extension.operations: Validating the extension /tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl
cli.azure.cli.core.extension.operations: Checksum of /tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl is OK
cli.azure.cli.core.extension.operations: Validation successful on /tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl
cli.azure.cli.core.extension.operations: Linux distro check: Reading from: /etc/apt/sources.list.d/azure-cli.list
cli.azure.cli.core.extension.operations: Linux distro check: An error occurred while checking linux distribution version source list consistency.
cli.azure.cli.core.extension.operations: [Errno 2] No such file or directory: '/etc/apt/sources.list.d/azure-cli.list'
cli.azure.cli.core.extension.operations: Executing pip with args: ['install', '--target', '/home/azuser/.azure/cliextensions/azure-devops', '/tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension.operations: Running: ['/usr/bin/python3', '-m', 'pip', 'install', '--target', '/home/azuser/.azure/cliextensions/azure-devops', '/tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']
cli.azure.cli.core.extension.operations: Using pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)
Non-user install due to --prefix or --target option
Created temporary directory: /tmp/pip-target-8duxcgb3
Created temporary directory: /tmp/pip-ephem-wheel-cache-ktz71woz
Created temporary directory: /tmp/pip-req-tracker-gid8af3h
Initialized build tracking at /tmp/pip-req-tracker-gid8af3h
Created build tracker: /tmp/pip-req-tracker-gid8af3h
Entered build tracker: /tmp/pip-req-tracker-gid8af3h
Created temporary directory: /tmp/pip-install-ufmxkl6e
Processing /tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl
  Added azure-devops==0.26.0 from file:///tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl to build tracker '/tmp/pip-req-tracker-gid8af3h'
  Removed azure-devops==0.26.0 from file:///tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl from build tracker '/tmp/pip-req-tracker-gid8af3h'
1 location(s) to search for versions of distro:
* https://pypi.org/simple/distro/
Fetching project page and analyzing links: https://pypi.org/simple/distro/
Getting page https://pypi.org/simple/distro/
Found index url https://pypi.org/simple
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/distro/ HTTP/1.1" 200 2736
  Found link https://files.pythonhosted.org/packages/b7/ff/876ab097c769295f880c9056d09c934f5c7c4c6054df1a83953b73f85f73/distro-0.5.0.tar.gz#sha256=873b3a87a5c69913d3d722d70370ffad65bbd21740770d5e6ef5acc2387f2174 (from https://pypi.org/simple/distro/), version: 0.5.0
  Found link https://files.pythonhosted.org/packages/01/9c/ea1b152ac247a5747598168b88ae82eb742461e2e556262ae741e69bd30f/distro-0.6.0.tar.gz#sha256=671757a4438aa813723984e0e5800de76af6aef12e7bb2468f648d155a1472f6 (from https://pypi.org/simple/distro/), version: 0.6.0
  Found link https://files.pythonhosted.org/packages/15/97/e2d5863d03cd01b250e51117be031dab2ec0916efc5915f5094f5fd7602c/distro-1.0.0.tar.gz#sha256=bf8ac22bb0e2a7dcfd6e5d238fb2b009f71a78bb773e7d420605b27871f95754 (from https://pypi.org/simple/distro/), version: 1.0.0
  Found link https://files.pythonhosted.org/packages/80/4e/22225a92917ebf7780ddb972e14add3d710c718ac00f152c7811ca07b4f3/distro-1.0.1-py2.py3-none-any.whl#sha256=94977c5b2c225e2f6552c8773bfe6b76b55521add9fc52960de4b24bbb16c9df (from https://pypi.org/simple/distro/), version: 1.0.1
  Found link https://files.pythonhosted.org/packages/0d/c5/de784640f0b434799d6eecb63baea9c099e7fe6c0908b4036c3a5200c281/distro-1.0.1.tar.gz#sha256=b940995858ec63a29a272ddf7916818bb5cccb9297928fb8230fd37a146b1f26 (from https://pypi.org/simple/distro/), version: 1.0.1
  Found link https://files.pythonhosted.org/packages/64/4d/2d450e0a6dcf394bc0c581e499a66e00d255938f74db6b15748373d36cc4/distro-1.0.2-py2.py3-none-any.whl#sha256=b62e8e0cc6c7b5f688e7034358c770adb5b338c866100be0d62a8a38e5772767 (from https://pypi.org/simple/distro/), version: 1.0.2
  Found link https://files.pythonhosted.org/packages/42/ac/89b295d2784d450ca71ac6f3665cb90f07afe0928e4436af627983faf2b1/distro-1.0.2.tar.gz#sha256=77ec1f3695eed4dcda4e0e89d04dfcd91a20d3080d34f9294c5da47235382745 (from https://pypi.org/simple/distro/), version: 1.0.2
  Found link https://files.pythonhosted.org/packages/4a/c2/50dbfaac03c14b8e155e4329553ef1f73a51a5c3cece8fb62e849c0785ed/distro-1.0.3-py2.py3-none-any.whl#sha256=f9fe1179ef339cc9456f21f9445d92112ec8f5dbc639ea73ca76b3141de7cc93 (from https://pypi.org/simple/distro/), version: 1.0.3
  Found link https://files.pythonhosted.org/packages/df/65/a8a94c1e069cf5f5bffab2a6b88d5a78089c60f2916e96d18b625731f191/distro-1.0.3.tar.gz#sha256=2d99cdfd48a72f5e5f8545a03ee320521af43bfc53d471f4adfaea3ec36fb2ce (from https://pypi.org/simple/distro/), version: 1.0.3
  Found link https://files.pythonhosted.org/packages/b5/82/363544dcfa3e7f1478e6839aa929a95ac6e1b0c3b56a277e6a6ef3ace2c9/distro-1.0.4-py2.py3-none-any.whl#sha256=c6bbd046334248383199440a6163dcf9557585b6c192985020abefda84a4814c (from https://pypi.org/simple/distro/), version: 1.0.4
  Found link https://files.pythonhosted.org/packages/aa/4e/2cf3e7f67abe101c053af838f8d9b3b5911fd9360b498a1ba66a23d1ed46/distro-1.0.4.tar.gz#sha256=9b000b0d637bb0cbd130a7a4835681e6993e309a85564dfea9d884825fe46954 (from https://pypi.org/simple/distro/), version: 1.0.4
  Found link https://files.pythonhosted.org/packages/b0/55/29bfd4d4d4149e860ed01aa446108eb17b240997b746c06a2d0c8ce04f69/distro-1.1.0-py2.py3-none-any.whl#sha256=f0e43d555fd45eda71eb474c2927c17b75e0673bf13f90f70bdce5b1a90cf0c5 (from https://pypi.org/simple/distro/), version: 1.1.0
  Found link https://files.pythonhosted.org/packages/21/7b/14198029b49abdf80c6b8aadd9862f863b683dc4d3c2418f01bc6fad9fa3/distro-1.1.0.tar.gz#sha256=722054925f339a39ca411a8c7079f390a41d42c422697bedf228f1a9c46ac1ee (from https://pypi.org/simple/distro/), version: 1.1.0
  Found link https://files.pythonhosted.org/packages/c1/e4/933159b5f7f9f5b7ae463e76f58da84a30d0943ab3c162c366a9ad95f01e/distro-1.2.0-py2.py3-none-any.whl#sha256=49945b5696240ac95021bd4908c1ace423db3e5ecac05a85497e4b3662750766 (from https://pypi.org/simple/distro/), version: 1.2.0
  Found link https://files.pythonhosted.org/packages/b2/2e/e4b8b7f947465474e58bc9dbaa6ea8c4b4cc9e845711c0fc2f66601e464b/distro-1.2.0.tar.gz#sha256=d94370e43b676ac44fbe1ab68ca903a6147eaba3a9e8eff85b2c05556a455b76 (from https://pypi.org/simple/distro/), version: 1.2.0
  Found link https://files.pythonhosted.org/packages/f6/b1/ba5a96bccd3496241d8908164b9502a129156443cdd5acbdbf04a90b7a09/distro-1.3.0-py2.py3-none-any.whl#sha256=6ec8e539cf412830e5ccf521aecf879f2c7fcf60ce446e33cd16eef1ed8a0158 (from https://pypi.org/simple/distro/), version: 1.3.0
  Found link https://files.pythonhosted.org/packages/d2/42/3b059929a920cd9d4e91e7a5e35f0d2ed75211f8f4e877be9d1bde9fdf46/distro-1.3.0.tar.gz#sha256=224041cef9600e72d19ae41ba006e71c05c4dc802516da715d7fda55ba3d8742 (from https://pypi.org/simple/distro/), version: 1.3.0
  Found link https://files.pythonhosted.org/packages/ea/35/82f79b92fa4d937146c660a6482cee4f3dfa1f97ff3d2a6f3ecba33e712e/distro-1.4.0-py2.py3-none-any.whl#sha256=eedf82a470ebe7d010f1872c17237c79ab04097948800029994fa458e52fb4b4 (from https://pypi.org/simple/distro/), version: 1.4.0
  Found link https://files.pythonhosted.org/packages/ca/e3/78443d739d7efeea86cbbe0216511d29b2f5ca8dbf51a6f2898432738987/distro-1.4.0.tar.gz#sha256=362dde65d846d23baee4b5c058c8586f219b5a54be1cf5fc6ff55c4578392f57 (from https://pypi.org/simple/distro/), version: 1.4.0
  Found link https://files.pythonhosted.org/packages/25/b7/b3c4270a11414cb22c6352ebc7a83aaa3712043be29daa05018fd5a5c956/distro-1.5.0-py2.py3-none-any.whl#sha256=df74eed763e18d10d0da624258524ae80486432cd17392d9c3d96f5e83cd2799 (from https://pypi.org/simple/distro/), version: 1.5.0
  Found link https://files.pythonhosted.org/packages/a6/a4/75064c334d8ae433445a20816b788700db1651f21bdb0af33db2aab142fe/distro-1.5.0.tar.gz#sha256=0e58756ae38fbd8fc3020d54badb8eae17c5b9dcbed388b17bb55b8a5928df92 (from https://pypi.org/simple/distro/), version: 1.5.0
  Found link https://files.pythonhosted.org/packages/b3/8d/a0a5c389d76f90c766e956515d34c3408a1e18f60fbaa08221d1f6b87490/distro-1.6.0-py2.py3-none-any.whl#sha256=c8713330ab31a034623a9515663ed87696700b55f04556b97c39cd261aa70dc7 (from https://pypi.org/simple/distro/), version: 1.6.0
  Found link https://files.pythonhosted.org/packages/a5/26/256fa167fe1bf8b97130b4609464be20331af8a3af190fb636a8a7efd7a2/distro-1.6.0.tar.gz#sha256=83f5e5a09f9c5f68f60173de572930effbcc0287bb84fdc4426cb4168c088424 (from https://pypi.org/simple/distro/), version: 1.6.0
  Found link https://files.pythonhosted.org/packages/e1/54/d08d1ad53788515392bec14d2d6e8c410bffdc127780a9a4aa8e6854d502/distro-1.7.0-py3-none-any.whl#sha256=d596311d707e692c2160c37807f83e3820c5d539d5a83e87cfb6babd8ba3a06b (from https://pypi.org/simple/distro/) (requires-python:>=3.6), version: 1.7.0
  Found link https://files.pythonhosted.org/packages/b5/7e/ddfbd640ac9a82e60718558a3de7d5988a7d4648385cf00318f60a8b073a/distro-1.7.0.tar.gz#sha256=151aeccf60c216402932b52e40ee477a939f8d58898927378a02abbe852c1c39 (from https://pypi.org/simple/distro/) (requires-python:>=3.6), version: 1.7.0
  Found link https://files.pythonhosted.org/packages/f4/2c/c90a3adaf0ddb70afe193f5ebfb539612af57cffe677c3126be533df3098/distro-1.8.0-py3-none-any.whl#sha256=99522ca3e365cac527b44bde033f64c6945d90eb9f769703caaec52b09bbd3ff (from https://pypi.org/simple/distro/) (requires-python:>=3.6), version: 1.8.0
  Found link https://files.pythonhosted.org/packages/4b/89/eaa3a3587ebf8bed93e45aa79be8c2af77d50790d15b53f6dfc85b57f398/distro-1.8.0.tar.gz#sha256=02e111d1dc6a50abb8eed6bf31c3e48ed8b0830d1ea2a1b78c61765c2513fdd8 (from https://pypi.org/simple/distro/) (requires-python:>=3.6), version: 1.8.0
Skipping link: not a file: https://pypi.org/simple/distro/
Given no hashes to check 2 links for project 'distro': discarding no candidates
Collecting distro==1.3.0
  Created temporary directory: /tmp/pip-unpack-cb9xiwfj
  Starting new HTTPS connection (1): files.pythonhosted.org:443
  https://files.pythonhosted.org:443 "GET /packages/f6/b1/ba5a96bccd3496241d8908164b9502a129156443cdd5acbdbf04a90b7a09/distro-1.3.0-py2.py3-none-any.whl HTTP/1.1" 200 16807
  Downloading distro-1.3.0-py2.py3-none-any.whl (16 kB)
  Added distro==1.3.0 from https://files.pythonhosted.org/packages/f6/b1/ba5a96bccd3496241d8908164b9502a129156443cdd5acbdbf04a90b7a09/distro-1.3.0-py2.py3-none-any.whl#sha256=6ec8e539cf412830e5ccf521aecf879f2c7fcf60ce446e33cd16eef1ed8a0158 (from azure-devops==0.26.0) to build tracker '/tmp/pip-req-tracker-gid8af3h'
  Removed distro==1.3.0 from https://files.pythonhosted.org/packages/f6/b1/ba5a96bccd3496241d8908164b9502a129156443cdd5acbdbf04a90b7a09/distro-1.3.0-py2.py3-none-any.whl#sha256=6ec8e539cf412830e5ccf521aecf879f2c7fcf60ce446e33cd16eef1ed8a0158 (from azure-devops==0.26.0) from build tracker '/tmp/pip-req-tracker-gid8af3h'
Created temporary directory: /tmp/pip-unpack-e1t0ix8w
Installing collected packages: distro, azure-devops

  Creating /tmp/pip-target-8duxcgb3/bin
  changing mode of /tmp/pip-target-8duxcgb3/bin/distro to 775

Successfully installed azure-devops-0.26.0 distro-1.3.0
Removed build tracker: '/tmp/pip-req-tracker-gid8af3h'

cli.azure.cli.core.extension.operations: Saved the whl to /home/azuser/.azure/cliextensions/azure-devops/azure_devops-0.26.0-py2.py3-none-any.whl
cli.azure.cli.core: Command index has been invalidated.
cli.knack.cli: Command arguments: ['artifacts', 'universal', 'download', '--organization', 'https://dev.azure.com/_redacted_/', '--project=_redacted_', '--scope', 'project', '--feed', '_redacted_', '--name', 'my-first-package', '--version', '0.0.1', '--path', '.', '--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 0x7f28a5f4f2e0>, <function OutputProducer.on_global_arguments at 0x7f28a5e96e60>, <function CLIQuery.on_global_arguments at 0x7f28a5ccc1f0>]
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 '['artifacts', 'universal', 'download', '--organization', 'https://dev.azure.com/_redacted_/', '--project=_redacted_', '--scope', 'project', '--feed', '_redacted_', '--name', 'my-first-package', '--version', '0.0.1', '--path', '.', '--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', 'config', 'configure', 'consumption', 'container', 'cosmosdb', 'databoxedge', 'dla', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'identity', 'interactive', 'iot', 'keyvault', 'kusto', 'lab', 'managedservices', 'maps', 'marketplaceordering', 'monitor', '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.086        34       144
cli.azure.cli.core: acs                       0.012         6        48
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        11        60
cli.azure.cli.core: appconfig                 0.002         8        42
cli.azure.cli.core: appservice                0.031        73       260
cli.azure.cli.core: aro                       0.005         1         8
cli.azure.cli.core: backup                    0.013        16        58
cli.azure.cli.core: batch                     0.018        36       104
cli.azure.cli.core: batchai                   0.002        10        30
cli.azure.cli.core: billing                   0.004        19        52
cli.azure.cli.core: botservice                0.002        12        42
cli.azure.cli.core: cdn                       0.005        39       133
cli.azure.cli.core: cloud                     0.001         1         7
cli.azure.cli.core: cognitiveservices         0.002         8        31
cli.azure.cli.core: config                    0.001         2         7
cli.azure.cli.core: configure                 0.001         2         5
cli.azure.cli.core: consumption               0.001         8         9
cli.azure.cli.core: container                 0.005         1        11
cli.azure.cli.core: cosmosdb                  0.009        57       191
cli.azure.cli.core: databoxedge               0.003         5        27
cli.azure.cli.core: dla                       0.003        23        62
cli.azure.cli.core: dls                       0.002         7        41
cli.azure.cli.core: dms                       0.001         3        22
cli.azure.cli.core: eventgrid                 0.004        25        96
cli.azure.cli.core: eventhubs                 0.005        12        18
cli.azure.cli.core: extension                 0.001         1         7
cli.azure.cli.core: feedback                  0.000         1         2
cli.azure.cli.core: find                      0.001         1         1
cli.azure.cli.core: hdinsight                 0.004         8        39
cli.azure.cli.core: identity                  0.001         2        11
cli.azure.cli.core: interactive               0.000         1         1
cli.azure.cli.core: iot                       0.047        19        82
cli.azure.cli.core: keyvault                  0.006        22       131
cli.azure.cli.core: kusto                     0.001         3        14
cli.azure.cli.core: lab                       0.002        11        34
cli.azure.cli.core: managedservices           0.001         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.019        26        79
cli.azure.cli.core: netappfiles               0.004        17        94
cli.azure.cli.core: network                   0.302       101       324
cli.azure.cli.core: policyinsights            0.007         9        17
cli.azure.cli.core: privatedns                0.004        14        66
cli.azure.cli.core: profile                   0.001         2         9
cli.azure.cli.core: rdbms                     0.128        55       230
cli.azure.cli.core: redis                     0.002         5        27
cli.azure.cli.core: relay                     0.002        10        37
cli.azure.cli.core: resource                  0.008        47       209
cli.azure.cli.core: role                      0.002        17        61
cli.azure.cli.core: search                    0.001         7        22
cli.azure.cli.core: security                  0.004        48       104
cli.azure.cli.core: servicebus                0.006        13        15
cli.azure.cli.core: serviceconnector          0.013         8       129
cli.azure.cli.core: servicefabric             0.007        26        75
cli.azure.cli.core: signalr                   0.002         8        30
cli.azure.cli.core: sql                       0.012        55       207
cli.azure.cli.core: sqlvm                     0.028         4        20
cli.azure.cli.core: storage                   0.035        58       272
cli.azure.cli.core: synapse                   0.009        54       246
cli.azure.cli.core: util                      0.001         3         7
cli.azure.cli.core: vm                        0.032        58       265
cli.azure.cli.core: Total (63)                0.922      1167      4504
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
cli.azure.cli.core: azure-devops              0.139        60       192  /home/azuser/.azure/cliextensions/azure-devops
cli.azure.cli.core: Total (1)                 0.139        60       192
cli.azure.cli.core: Loaded 1217 groups, 4696 commands.
cli.azure.cli.core: Updated command index in 0.003 seconds.
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f28a517e7a0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/azuser/.azure/commands/2023-06-28.21-35-14.artifacts_universal_download.19666.log'.
az_command_data_logger: command args: artifacts universal download --organization {} --project={} --scope {} --feed {} --name {} --version {} --path {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7f28a51932e0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7f28a51d91b0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7f28a51d92d0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x7f28a43bbeb0>]
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f28a5e96ef0>, <function CLIQuery.handle_query_parameter at 0x7f28a5ccc280>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7f28a51d9240>, <function handler at 0x7f28a4196440>, <function DevCommandsLoader.post_parse_args at 0x7f28a10d0160>]
az_command_data_logger: extension name: azure-devops
az_command_data_logger: extension version: 0.26.0
cli.azext_devops.dev.common.artifacttool_updater: Checking for a new ArtifactTool
cli.azext_devops.dev.common.artifacttool_updater: Checking for ArtifactTool updates
cli.azext_devops.dev.common._credentials: Getting credential: azdevops-cli:https://dev.azure.com/_redacted_
keyring.backend: Loading KWallet
keyring.backend: Loading SecretService
keyring.backend: Loading Windows
keyring.backend: Loading chainer
keyring.backend: Loading libsecret
keyring.backend: Loading macOS
cli.azext_devops.dev.common.credential_store: Keyring backend : keyring.backends.fail.Keyring (priority: 0)
cli.azext_devops.dev.common.credential_store: Keyring not configured properly or package not found.Looking for credentials with key:azdevops-cli:https://dev.azure.com/_redacted_ in the file: /home/azuser/.azure/azuredevops/personalAccessTokens
cli.azext_devops.dev.common._credentials: Getting credential: azdevops-cli: default
cli.azext_devops.dev.common.credential_store: Keyring backend : keyring.backends.fail.Keyring (priority: 0)
cli.azext_devops.dev.common.credential_store: Keyring not configured properly or package not found.Looking for credentials with key:azdevops-cli: default in the file: /home/azuser/.azure/azuredevops/personalAccessTokens
cli.azure.cli.core: Current cloud config:
AzureCloud
cli.azext_devops.dev.common.services: trying to get token (temp) for tenant _redacted_ and user systemAssignedIdentity
cli.azext_devops.dev.common.services: not able to get token from az login
cli.azext_devops.dev.common.services: Tenant shouldn't be specified for managed identity account
Traceback (most recent call last):
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/services.py", line 157, in get_token_from_az_login
    raw = profile.get_raw_token(
  File "/home/azuser/.local/lib/python3.10/site-packages/azure/cli/core/_profile.py", line 368, in get_raw_token
    raise CLIError("Tenant shouldn't be specified for managed identity account")
knack.util.CLIError: Tenant shouldn't be specified for managed identity account
cli.azext_devops.dev.common._credentials: Getting credential: azdevops-cli:https://dev.azure.com/_redacted_
cli.azext_devops.dev.common.credential_store: Keyring backend : keyring.backends.fail.Keyring (priority: 0)
cli.azext_devops.dev.common.credential_store: Keyring not configured properly or package not found.Looking for credentials with key:azdevops-cli:https://dev.azure.com/_redacted_ in the file: /home/azuser/.azure/azuredevops/personalAccessTokens
cli.azext_devops.dev.common._credentials: Getting credential: azdevops-cli: default
cli.azext_devops.dev.common.credential_store: Keyring backend : keyring.backends.fail.Keyring (priority: 0)
cli.azext_devops.dev.common.credential_store: Keyring not configured properly or package not found.Looking for credentials with key:azdevops-cli: default in the file: /home/azuser/.azure/azuredevops/personalAccessTokens
cli.azext_devops.dev.common.artifacttool_updater: Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials.  Please see https://aka.ms/azure-devops-cli-auth for more information.
Traceback (most recent call last):
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 59, in _get_artifacttool
    release = _get_current_release(organization, override_version)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 155, in _get_current_release
    connection = get_connection(organization)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/services.py", line 43, in get_connection
    credentials = _get_credentials(organization)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/services.py", line 81, in _get_credentials
    raise get_authentication_error('Before you can run Azure DevOps commands, you need to run the login command'
knack.util.CLIError: Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials.  Please see https://aka.ms/azure-devops-cli-auth for more information.
cli.azext_devops.dev.common.exception_handler: handling generic error
cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 59, in _get_artifacttool
    release = _get_current_release(organization, override_version)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 155, in _get_current_release
    connection = get_connection(organization)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/services.py", line 43, in get_connection
    credentials = _get_credentials(organization)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/services.py", line 81, in _get_credentials
    raise get_authentication_error('Before you can run Azure DevOps commands, you need to run the login command'
knack.util.CLIError: Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials.  Please see https://aka.ms/azure-devops-cli-auth for more information.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/azuser/.local/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/home/azuser/.local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/home/azuser/.local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/home/azuser/.local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 718, in _run_job
    return cmd_copy.exception_handler(ex)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/exception_handler.py", line 31, in azure_devops_exception_handler
    reraise(*sys.exc_info())
  File "/usr/lib/python3/dist-packages/six.py", line 719, in reraise
    raise value
  File "/home/azuser/.local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
    result = cmd_copy(params)
  File "/home/azuser/.local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
    return self.handler(*args, **kwargs)
  File "/home/azuser/.local/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/artifacts/universal.py", line 98, in download_package
    return artifact_tool.download_universal(organization, project, feed, name, version, path, file_filter)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool.py", line 42, in download_universal
    return self.run_artifacttool(organization, args, "Downloading")
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool.py", line 57, in run_artifacttool
    artifacttool_dir = self._artifacttool_updater.get_latest_artifacttool(organization)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 43, in get_latest_artifacttool
    artifacttool_binary_path = self._get_artifacttool(organization)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 62, in _get_artifacttool
    raise CLIError('Failed to update Universal Packages tooling.\n {}'.format(ex))
knack.util.CLIError: Failed to update Universal Packages tooling.
 Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials.  Please see https://aka.ms/azure-devops-cli-auth for more information.

cli.azure.cli.core.azclierror: Failed to update Universal Packages tooling.
 Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials.  Please see https://aka.ms/azure-devops-cli-auth for more information.
az_command_data_logger: Failed to update Universal Packages tooling.
 Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials.  Please see https://aka.ms/azure-devops-cli-auth for more information.
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f28a517e9e0>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 1.275 seconds (init: 0.115, invoke: 1.160)
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 3905 in cache
telemetry.check: Negative: The /home/azuser/.azure/telemetry.txt was modified at 2023-06-28 21:34:37.257854, which in less than 600.000000 s
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7ff1cb99a9e0>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 13.105 seconds (init: 0.116, invoke: 12.989)
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 3713 in cache
telemetry.check: Negative: The /home/azuser/.azure/telemetry.txt was modified at 2023-06-28 21:34:37.257854, which in less than 600.000000 s

Expected behavior

Azure cli should log in to azure-devops and download the artefact

Environment Summary

azure-cli                         2.49.0
core                              2.49.0
telemetry                          1.0.8

Extensions:
azure-devops                      0.26.0

Dependencies:
msal                              1.20.0
azure-mgmt-resource               22.0.0

Python location '/usr/bin/python3'
Extensions directory '/home/azuser/.azure/cliextensions'

Python (Linux) 3.10.6 (main, May 29 2023, 11:10:38) ÄGCC 11.3.0Å

Legal docs and information: aka.ms/AzureCliLegal


Your CLI is up-to-date.

Additional context

To Reproduce:

  1. Create a user-assigned managed identity on an Azure subscription.
  2. Add the user-assigned managed identity to the users of your Azure DevOps organization.
  3. Add the managed identity user to an Azure DevOps group.
  4. Create an Azure DevOps artifact feed and package.
  5. Add the Azure DevOps group, with the managed identity user as a member, to the feed's reader permissions.
  6. Create a virtual machine on the same subscription as the managed identity.
  7. Assign the user-assigned managed identity to the virtual machine.
  8. Install Azure CLI and run the failing command.
  9. The command will return the error described in this issue.

To Fix:

  1. Navigate to the following location:
    raise CLIError("Tenant shouldn't be specified for managed identity account")
  2. Replace the line
    raise CLIError("Please specify only one of subscription and tenant, not both")
    with
    tenant = False
  3. Re-run the az artifacts universal download command.
@JayDoubleu JayDoubleu added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jun 28, 2023
@azure-client-tools-bot-prd
Copy link

Hi @JayDoubleu,

This is not the official Azure CLI published by Microsoft.

How to tell if the installed Azure CLI is unofficial:

Please follow https://docs.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.

@azure-client-tools-bot-prd azure-client-tools-bot-prd bot added the Auto-Resolve Auto resolve by bot label Jun 28, 2023
@ghost ghost 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 Jun 28, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Jun 28, 2023

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

@ghost ghost assigned jiasli Jun 28, 2023
@ghost ghost added this to the Backlog milestone Jun 28, 2023
@ghost ghost 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 CXP Attention This issue is handled by CXP team. DevOps Installation AAD Artifacts az artifacts labels Jun 28, 2023
@JayDoubleu
Copy link
Author

/clibot unresolve

@yonzhan yonzhan removed Account az login/account AAD question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jun 28, 2023
@navba-MSFT navba-MSFT added Service Attention This issue is responsible by Azure service team. and removed CXP Attention This issue is handled by CXP team. labels Jun 30, 2023
@ghost
Copy link

ghost commented Jun 30, 2023

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @v-anvashist, @V-hmusukula.

Issue Details

Describe the bug

az artifacts universal download doesn't seem to work with user assigned managed identities

Related command

az login --identity 
az artifacts universal download  --organization https://dev.azure.com/$org  --project="$project"  --scope project  --feed $feed  --name my-first-package  --version 0.0.1  --path $path

Errors

Failed to update Universal Packages tooling.
Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials. Please see https://aka.ms/azure-devops-cli-auth for more information.

cli.azext_devops.dev.common.services: trying to get token (temp) for tenant _redacted_ and user systemAssignedIdentity
cli.azext_devops.dev.common.services: not able to get token from az login
cli.azext_devops.dev.common.services: Tenant shouldn't be specified for managed identity account
Traceback (most recent call last):
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/services.py", line 157, in get_token_from_az_login
    raw = profile.get_raw_token(
  File "/home/azuser/.local/lib/python3.10/site-packages/azure/cli/core/_profile.py", line 368, in get_raw_token
    raise CLIError("Tenant shouldn't be specified for managed identity account")
knack.util.CLIError: Tenant shouldn't be specified for managed identity account

Issue script & Debug output

cli.knack.cli: Command arguments: ['artifacts', 'universal', 'download', '--organization', 'https://dev.azure.com/_redacted_/', '--project=_redacted_', '--scope', 'project', '--feed', '_redacted_', '--name', 'my-first-package', '--version', '0.0.1', '--path', '.', '--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 0x7ff1cc76b2e0>, <function OutputProducer.on_global_arguments at 0x7ff1cc6b2e60>, <function CLIQuery.on_global_arguments at 0x7ff1cc4e81f0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: No module found from index for '['artifacts', 'universal', 'download', '--organization', 'https://dev.azure.com/_redacted_/', '--project=_redacted_', '--scope', 'project', '--feed', '_redacted_', '--name', 'my-first-package', '--version', '0.0.1', '--path', '.', '--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', 'config', 'configure', 'consumption', 'container', 'cosmosdb', 'databoxedge', 'dla', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'identity', 'interactive', 'iot', 'keyvault', 'kusto', 'lab', 'managedservices', 'maps', 'marketplaceordering', 'monitor', '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.086        34       144
cli.azure.cli.core: acs                       0.013         6        48
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        11        60
cli.azure.cli.core: appconfig                 0.002         8        42
cli.azure.cli.core: appservice                0.031        73       260
cli.azure.cli.core: aro                       0.005         1         8
cli.azure.cli.core: backup                    0.013        16        58
cli.azure.cli.core: batch                     0.018        36       104
cli.azure.cli.core: batchai                   0.002        10        30
cli.azure.cli.core: billing                   0.004        19        52
cli.azure.cli.core: botservice                0.002        12        42
cli.azure.cli.core: cdn                       0.005        39       133
cli.azure.cli.core: cloud                     0.001         1         7
cli.azure.cli.core: cognitiveservices         0.002         8        31
cli.azure.cli.core: config                    0.001         2         7
cli.azure.cli.core: configure                 0.001         2         5
cli.azure.cli.core: consumption               0.001         8         9
cli.azure.cli.core: container                 0.005         1        11
cli.azure.cli.core: cosmosdb                  0.009        57       191
cli.azure.cli.core: databoxedge               0.003         5        27
cli.azure.cli.core: dla                       0.003        23        62
cli.azure.cli.core: dls                       0.002         7        41
cli.azure.cli.core: dms                       0.001         3        22
cli.azure.cli.core: eventgrid                 0.004        25        96
cli.azure.cli.core: eventhubs                 0.005        12        18
cli.azure.cli.core: extension                 0.001         1         7
cli.azure.cli.core: feedback                  0.000         1         2
cli.azure.cli.core: find                      0.001         1         1
cli.azure.cli.core: hdinsight                 0.004         8        39
cli.azure.cli.core: identity                  0.001         2        11
cli.azure.cli.core: interactive               0.000         1         1
cli.azure.cli.core: iot                       0.047        19        82
cli.azure.cli.core: keyvault                  0.006        22       131
cli.azure.cli.core: kusto                     0.001         3        14
cli.azure.cli.core: lab                       0.002        11        34
cli.azure.cli.core: managedservices           0.001         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.019        26        79
cli.azure.cli.core: netappfiles               0.004        17        94
cli.azure.cli.core: network                   0.305       101       324
cli.azure.cli.core: policyinsights            0.007         9        17
cli.azure.cli.core: privatedns                0.004        14        66
cli.azure.cli.core: profile                   0.001         2         9
cli.azure.cli.core: rdbms                     0.129        55       230
cli.azure.cli.core: redis                     0.002         5        27
cli.azure.cli.core: relay                     0.002        10        37
cli.azure.cli.core: resource                  0.008        47       209
cli.azure.cli.core: role                      0.002        17        61
cli.azure.cli.core: search                    0.002         7        22
cli.azure.cli.core: security                  0.004        48       104
cli.azure.cli.core: servicebus                0.006        13        15
cli.azure.cli.core: serviceconnector          0.009         8       129
cli.azure.cli.core: servicefabric             0.007        26        75
cli.azure.cli.core: signalr                   0.002         8        30
cli.azure.cli.core: sql                       0.012        55       207
cli.azure.cli.core: sqlvm                     0.028         4        20
cli.azure.cli.core: storage                   0.036        58       272
cli.azure.cli.core: synapse                   0.009        54       246
cli.azure.cli.core: util                      0.001         3         7
cli.azure.cli.core: vm                        0.033        58       265
cli.azure.cli.core: Total (63)                0.924      1167      4504
cli.azure.cli.core: Loaded 1157 groups, 4504 commands.
cli.azure.cli.core: Updated command index in 0.004 seconds.
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7ff1cb99a7a0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/azuser/.azure/commands/2023-06-28.21-35-02.unknown_command.19657.log'.
az_command_data_logger: command args: artifacts universal download --organization {} --project={} --scope {} --feed {} --name {} --version {} --path {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7ff1cb9af2e0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7ff1cba011b0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7ff1cba012d0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x7ff1cabd7eb0>]
cli.azure.cli.core._session: Failed to load or parse file /home/azuser/.azure/extensionCommandTree.json. It will be overridden by default settings.
urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443
urllib3.connectionpool: https://aka.ms:443 "GET /azExtCmdTree HTTP/1.1" 301 0
urllib3.connectionpool: Starting new HTTPS connection (1): azurecliextensionsync.blob.core.windows.net:443
urllib3.connectionpool: https://azurecliextensionsync.blob.core.windows.net:443 "GET /cmd-index/extensionCommandTree.json HTTP/1.1" 200 135010
The command requires the extension azure-devops. Do you want to install it now? The command will continue to run after the extension is installed. (Y/n): Y
cli.azure.cli.core.extension.dynamic_install: Run 'az config set extension.use_dynamic_install=yes_without_prompt' to allow installing extensions without prompt.
urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443
urllib3.connectionpool: https://aka.ms:443 "GET /azure-cli-extension-index-v1 HTTP/1.1" 301 0
urllib3.connectionpool: Starting new HTTPS connection (1): azcliextensionsync.blob.core.windows.net:443
urllib3.connectionpool: https://azcliextensionsync.blob.core.windows.net:443 "GET /index1/index.json HTTP/1.1" 200 2935242
cli.azure.cli.core.extension._resolve: Candidates ['azure_devops-0.12.0-py2.py3-none-any.whl', 'azure_devops-0.17.0-py2.py3-none-any.whl', 'azure_devops-0.21.0-py2.py3-none-any.whl', 'azure_devops-0.26.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_devops-0.12.0-py2.py3-none-any.whl', 'azure_devops-0.17.0-py2.py3-none-any.whl', 'azure_devops-0.21.0-py2.py3-none-any.whl', 'azure_devops-0.26.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_devops-0.12.0-py2.py3-none-any.whl', 'azure_devops-0.17.0-py2.py3-none-any.whl', 'azure_devops-0.21.0-py2.py3-none-any.whl', 'azure_devops-0.26.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_devops-0.12.0-py2.py3-none-any.whl', 'azure_devops-0.17.0-py2.py3-none-any.whl', 'azure_devops-0.21.0-py2.py3-none-any.whl', 'azure_devops-0.26.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Chosen {'downloadUrl': 'https://github.com/Azure/azure-devops-cli-extension/releases/download/20230127.2/azure_devops-0.26.0-py2.py3-none-any.whl', 'filename': 'azure_devops-0.26.0-py2.py3-none-any.whl', 'metadata': {'azext.minCliCoreVersion': '2.30.0', 'classifiers': ['Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License'], 'extensions': {'python.details': {'contacts': [{'email': '[email protected]', 'name': 'Microsoft', 'role': 'author'}], 'document_names': {'description': 'DESCRIPTION.rst'}, 'project_urls': {'Home': 'https://github.com/Microsoft/azure-devops-cli-extension'}}}, 'extras': [], 'generator': 'bdist_wheel (0.30.0)', 'license': 'MIT', 'metadata_version': '2.0', 'name': 'azure-devops', 'run_requires': [{'requires': ['distro (==1.3.0)']}], 'summary': 'Tools for managing Azure DevOps.', 'version': '0.26.0'}, 'sha256Digest': '565fc207f1740c26957f382fe2eefabec254011fb2d1b50c0e540f894f47dcbe'}
cli.azure.cli.core.extension.operations: Extension source is url? True
cli.azure.cli.core.extension.operations: Downloading https://github.com/Azure/azure-devops-cli-extension/releases/download/20230127.2/azure_devops-0.26.0-py2.py3-none-any.whl to /tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl
urllib3.connectionpool: Starting new HTTPS connection (1): github.com:443
urllib3.connectionpool: https://github.com:443 "GET /Azure/azure-devops-cli-extension/releases/download/20230127.2/azure_devops-0.26.0-py2.py3-none-any.whl HTTP/1.1" 302 0
urllib3.connectionpool: Starting new HTTPS connection (1): objects.githubusercontent.com:443
urllib3.connectionpool: https://objects.githubusercontent.com:443 "GET /github-production-release-asset-2e65be/107708057/8c8c37f1-25aa-4394-9b37-ab8655c6d437?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230628%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230628T213421Z&X-Amz-Expires=300&X-Amz-Signature=3d7d50fae321c5ce4a678fca6817029e6f1c7e9338fbfc790298587687786edd&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=107708057&response-content-disposition=attachment%3B%20filename%3Dazure_devops-0.26.0-py2.py3-none-any.whl&response-content-type=application%2Foctet-stream HTTP/1.1" 200 1195005
cli.azure.cli.core.extension.operations: Downloaded to /tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl
cli.azure.cli.core.extension.operations: Validating the extension /tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl
cli.azure.cli.core.extension.operations: Checksum of /tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl is OK
cli.azure.cli.core.extension.operations: Validation successful on /tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl
cli.azure.cli.core.extension.operations: Linux distro check: Reading from: /etc/apt/sources.list.d/azure-cli.list
cli.azure.cli.core.extension.operations: Linux distro check: An error occurred while checking linux distribution version source list consistency.
cli.azure.cli.core.extension.operations: [Errno 2] No such file or directory: '/etc/apt/sources.list.d/azure-cli.list'
cli.azure.cli.core.extension.operations: Executing pip with args: ['install', '--target', '/home/azuser/.azure/cliextensions/azure-devops', '/tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl']
cli.azure.cli.core.extension.operations: Running: ['/usr/bin/python3', '-m', 'pip', 'install', '--target', '/home/azuser/.azure/cliextensions/azure-devops', '/tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']
cli.azure.cli.core.extension.operations: Using pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)
Non-user install due to --prefix or --target option
Created temporary directory: /tmp/pip-target-8duxcgb3
Created temporary directory: /tmp/pip-ephem-wheel-cache-ktz71woz
Created temporary directory: /tmp/pip-req-tracker-gid8af3h
Initialized build tracking at /tmp/pip-req-tracker-gid8af3h
Created build tracker: /tmp/pip-req-tracker-gid8af3h
Entered build tracker: /tmp/pip-req-tracker-gid8af3h
Created temporary directory: /tmp/pip-install-ufmxkl6e
Processing /tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl
  Added azure-devops==0.26.0 from file:///tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl to build tracker '/tmp/pip-req-tracker-gid8af3h'
  Removed azure-devops==0.26.0 from file:///tmp/tmpm284k7hm/azure_devops-0.26.0-py2.py3-none-any.whl from build tracker '/tmp/pip-req-tracker-gid8af3h'
1 location(s) to search for versions of distro:
* https://pypi.org/simple/distro/
Fetching project page and analyzing links: https://pypi.org/simple/distro/
Getting page https://pypi.org/simple/distro/
Found index url https://pypi.org/simple
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/distro/ HTTP/1.1" 200 2736
  Found link https://files.pythonhosted.org/packages/b7/ff/876ab097c769295f880c9056d09c934f5c7c4c6054df1a83953b73f85f73/distro-0.5.0.tar.gz#sha256=873b3a87a5c69913d3d722d70370ffad65bbd21740770d5e6ef5acc2387f2174 (from https://pypi.org/simple/distro/), version: 0.5.0
  Found link https://files.pythonhosted.org/packages/01/9c/ea1b152ac247a5747598168b88ae82eb742461e2e556262ae741e69bd30f/distro-0.6.0.tar.gz#sha256=671757a4438aa813723984e0e5800de76af6aef12e7bb2468f648d155a1472f6 (from https://pypi.org/simple/distro/), version: 0.6.0
  Found link https://files.pythonhosted.org/packages/15/97/e2d5863d03cd01b250e51117be031dab2ec0916efc5915f5094f5fd7602c/distro-1.0.0.tar.gz#sha256=bf8ac22bb0e2a7dcfd6e5d238fb2b009f71a78bb773e7d420605b27871f95754 (from https://pypi.org/simple/distro/), version: 1.0.0
  Found link https://files.pythonhosted.org/packages/80/4e/22225a92917ebf7780ddb972e14add3d710c718ac00f152c7811ca07b4f3/distro-1.0.1-py2.py3-none-any.whl#sha256=94977c5b2c225e2f6552c8773bfe6b76b55521add9fc52960de4b24bbb16c9df (from https://pypi.org/simple/distro/), version: 1.0.1
  Found link https://files.pythonhosted.org/packages/0d/c5/de784640f0b434799d6eecb63baea9c099e7fe6c0908b4036c3a5200c281/distro-1.0.1.tar.gz#sha256=b940995858ec63a29a272ddf7916818bb5cccb9297928fb8230fd37a146b1f26 (from https://pypi.org/simple/distro/), version: 1.0.1
  Found link https://files.pythonhosted.org/packages/64/4d/2d450e0a6dcf394bc0c581e499a66e00d255938f74db6b15748373d36cc4/distro-1.0.2-py2.py3-none-any.whl#sha256=b62e8e0cc6c7b5f688e7034358c770adb5b338c866100be0d62a8a38e5772767 (from https://pypi.org/simple/distro/), version: 1.0.2
  Found link https://files.pythonhosted.org/packages/42/ac/89b295d2784d450ca71ac6f3665cb90f07afe0928e4436af627983faf2b1/distro-1.0.2.tar.gz#sha256=77ec1f3695eed4dcda4e0e89d04dfcd91a20d3080d34f9294c5da47235382745 (from https://pypi.org/simple/distro/), version: 1.0.2
  Found link https://files.pythonhosted.org/packages/4a/c2/50dbfaac03c14b8e155e4329553ef1f73a51a5c3cece8fb62e849c0785ed/distro-1.0.3-py2.py3-none-any.whl#sha256=f9fe1179ef339cc9456f21f9445d92112ec8f5dbc639ea73ca76b3141de7cc93 (from https://pypi.org/simple/distro/), version: 1.0.3
  Found link https://files.pythonhosted.org/packages/df/65/a8a94c1e069cf5f5bffab2a6b88d5a78089c60f2916e96d18b625731f191/distro-1.0.3.tar.gz#sha256=2d99cdfd48a72f5e5f8545a03ee320521af43bfc53d471f4adfaea3ec36fb2ce (from https://pypi.org/simple/distro/), version: 1.0.3
  Found link https://files.pythonhosted.org/packages/b5/82/363544dcfa3e7f1478e6839aa929a95ac6e1b0c3b56a277e6a6ef3ace2c9/distro-1.0.4-py2.py3-none-any.whl#sha256=c6bbd046334248383199440a6163dcf9557585b6c192985020abefda84a4814c (from https://pypi.org/simple/distro/), version: 1.0.4
  Found link https://files.pythonhosted.org/packages/aa/4e/2cf3e7f67abe101c053af838f8d9b3b5911fd9360b498a1ba66a23d1ed46/distro-1.0.4.tar.gz#sha256=9b000b0d637bb0cbd130a7a4835681e6993e309a85564dfea9d884825fe46954 (from https://pypi.org/simple/distro/), version: 1.0.4
  Found link https://files.pythonhosted.org/packages/b0/55/29bfd4d4d4149e860ed01aa446108eb17b240997b746c06a2d0c8ce04f69/distro-1.1.0-py2.py3-none-any.whl#sha256=f0e43d555fd45eda71eb474c2927c17b75e0673bf13f90f70bdce5b1a90cf0c5 (from https://pypi.org/simple/distro/), version: 1.1.0
  Found link https://files.pythonhosted.org/packages/21/7b/14198029b49abdf80c6b8aadd9862f863b683dc4d3c2418f01bc6fad9fa3/distro-1.1.0.tar.gz#sha256=722054925f339a39ca411a8c7079f390a41d42c422697bedf228f1a9c46ac1ee (from https://pypi.org/simple/distro/), version: 1.1.0
  Found link https://files.pythonhosted.org/packages/c1/e4/933159b5f7f9f5b7ae463e76f58da84a30d0943ab3c162c366a9ad95f01e/distro-1.2.0-py2.py3-none-any.whl#sha256=49945b5696240ac95021bd4908c1ace423db3e5ecac05a85497e4b3662750766 (from https://pypi.org/simple/distro/), version: 1.2.0
  Found link https://files.pythonhosted.org/packages/b2/2e/e4b8b7f947465474e58bc9dbaa6ea8c4b4cc9e845711c0fc2f66601e464b/distro-1.2.0.tar.gz#sha256=d94370e43b676ac44fbe1ab68ca903a6147eaba3a9e8eff85b2c05556a455b76 (from https://pypi.org/simple/distro/), version: 1.2.0
  Found link https://files.pythonhosted.org/packages/f6/b1/ba5a96bccd3496241d8908164b9502a129156443cdd5acbdbf04a90b7a09/distro-1.3.0-py2.py3-none-any.whl#sha256=6ec8e539cf412830e5ccf521aecf879f2c7fcf60ce446e33cd16eef1ed8a0158 (from https://pypi.org/simple/distro/), version: 1.3.0
  Found link https://files.pythonhosted.org/packages/d2/42/3b059929a920cd9d4e91e7a5e35f0d2ed75211f8f4e877be9d1bde9fdf46/distro-1.3.0.tar.gz#sha256=224041cef9600e72d19ae41ba006e71c05c4dc802516da715d7fda55ba3d8742 (from https://pypi.org/simple/distro/), version: 1.3.0
  Found link https://files.pythonhosted.org/packages/ea/35/82f79b92fa4d937146c660a6482cee4f3dfa1f97ff3d2a6f3ecba33e712e/distro-1.4.0-py2.py3-none-any.whl#sha256=eedf82a470ebe7d010f1872c17237c79ab04097948800029994fa458e52fb4b4 (from https://pypi.org/simple/distro/), version: 1.4.0
  Found link https://files.pythonhosted.org/packages/ca/e3/78443d739d7efeea86cbbe0216511d29b2f5ca8dbf51a6f2898432738987/distro-1.4.0.tar.gz#sha256=362dde65d846d23baee4b5c058c8586f219b5a54be1cf5fc6ff55c4578392f57 (from https://pypi.org/simple/distro/), version: 1.4.0
  Found link https://files.pythonhosted.org/packages/25/b7/b3c4270a11414cb22c6352ebc7a83aaa3712043be29daa05018fd5a5c956/distro-1.5.0-py2.py3-none-any.whl#sha256=df74eed763e18d10d0da624258524ae80486432cd17392d9c3d96f5e83cd2799 (from https://pypi.org/simple/distro/), version: 1.5.0
  Found link https://files.pythonhosted.org/packages/a6/a4/75064c334d8ae433445a20816b788700db1651f21bdb0af33db2aab142fe/distro-1.5.0.tar.gz#sha256=0e58756ae38fbd8fc3020d54badb8eae17c5b9dcbed388b17bb55b8a5928df92 (from https://pypi.org/simple/distro/), version: 1.5.0
  Found link https://files.pythonhosted.org/packages/b3/8d/a0a5c389d76f90c766e956515d34c3408a1e18f60fbaa08221d1f6b87490/distro-1.6.0-py2.py3-none-any.whl#sha256=c8713330ab31a034623a9515663ed87696700b55f04556b97c39cd261aa70dc7 (from https://pypi.org/simple/distro/), version: 1.6.0
  Found link https://files.pythonhosted.org/packages/a5/26/256fa167fe1bf8b97130b4609464be20331af8a3af190fb636a8a7efd7a2/distro-1.6.0.tar.gz#sha256=83f5e5a09f9c5f68f60173de572930effbcc0287bb84fdc4426cb4168c088424 (from https://pypi.org/simple/distro/), version: 1.6.0
  Found link https://files.pythonhosted.org/packages/e1/54/d08d1ad53788515392bec14d2d6e8c410bffdc127780a9a4aa8e6854d502/distro-1.7.0-py3-none-any.whl#sha256=d596311d707e692c2160c37807f83e3820c5d539d5a83e87cfb6babd8ba3a06b (from https://pypi.org/simple/distro/) (requires-python:>=3.6), version: 1.7.0
  Found link https://files.pythonhosted.org/packages/b5/7e/ddfbd640ac9a82e60718558a3de7d5988a7d4648385cf00318f60a8b073a/distro-1.7.0.tar.gz#sha256=151aeccf60c216402932b52e40ee477a939f8d58898927378a02abbe852c1c39 (from https://pypi.org/simple/distro/) (requires-python:>=3.6), version: 1.7.0
  Found link https://files.pythonhosted.org/packages/f4/2c/c90a3adaf0ddb70afe193f5ebfb539612af57cffe677c3126be533df3098/distro-1.8.0-py3-none-any.whl#sha256=99522ca3e365cac527b44bde033f64c6945d90eb9f769703caaec52b09bbd3ff (from https://pypi.org/simple/distro/) (requires-python:>=3.6), version: 1.8.0
  Found link https://files.pythonhosted.org/packages/4b/89/eaa3a3587ebf8bed93e45aa79be8c2af77d50790d15b53f6dfc85b57f398/distro-1.8.0.tar.gz#sha256=02e111d1dc6a50abb8eed6bf31c3e48ed8b0830d1ea2a1b78c61765c2513fdd8 (from https://pypi.org/simple/distro/) (requires-python:>=3.6), version: 1.8.0
Skipping link: not a file: https://pypi.org/simple/distro/
Given no hashes to check 2 links for project 'distro': discarding no candidates
Collecting distro==1.3.0
  Created temporary directory: /tmp/pip-unpack-cb9xiwfj
  Starting new HTTPS connection (1): files.pythonhosted.org:443
  https://files.pythonhosted.org:443 "GET /packages/f6/b1/ba5a96bccd3496241d8908164b9502a129156443cdd5acbdbf04a90b7a09/distro-1.3.0-py2.py3-none-any.whl HTTP/1.1" 200 16807
  Downloading distro-1.3.0-py2.py3-none-any.whl (16 kB)
  Added distro==1.3.0 from https://files.pythonhosted.org/packages/f6/b1/ba5a96bccd3496241d8908164b9502a129156443cdd5acbdbf04a90b7a09/distro-1.3.0-py2.py3-none-any.whl#sha256=6ec8e539cf412830e5ccf521aecf879f2c7fcf60ce446e33cd16eef1ed8a0158 (from azure-devops==0.26.0) to build tracker '/tmp/pip-req-tracker-gid8af3h'
  Removed distro==1.3.0 from https://files.pythonhosted.org/packages/f6/b1/ba5a96bccd3496241d8908164b9502a129156443cdd5acbdbf04a90b7a09/distro-1.3.0-py2.py3-none-any.whl#sha256=6ec8e539cf412830e5ccf521aecf879f2c7fcf60ce446e33cd16eef1ed8a0158 (from azure-devops==0.26.0) from build tracker '/tmp/pip-req-tracker-gid8af3h'
Created temporary directory: /tmp/pip-unpack-e1t0ix8w
Installing collected packages: distro, azure-devops

  Creating /tmp/pip-target-8duxcgb3/bin
  changing mode of /tmp/pip-target-8duxcgb3/bin/distro to 775

Successfully installed azure-devops-0.26.0 distro-1.3.0
Removed build tracker: '/tmp/pip-req-tracker-gid8af3h'

cli.azure.cli.core.extension.operations: Saved the whl to /home/azuser/.azure/cliextensions/azure-devops/azure_devops-0.26.0-py2.py3-none-any.whl
cli.azure.cli.core: Command index has been invalidated.
cli.knack.cli: Command arguments: ['artifacts', 'universal', 'download', '--organization', 'https://dev.azure.com/_redacted_/', '--project=_redacted_', '--scope', 'project', '--feed', '_redacted_', '--name', 'my-first-package', '--version', '0.0.1', '--path', '.', '--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 0x7f28a5f4f2e0>, <function OutputProducer.on_global_arguments at 0x7f28a5e96e60>, <function CLIQuery.on_global_arguments at 0x7f28a5ccc1f0>]
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 '['artifacts', 'universal', 'download', '--organization', 'https://dev.azure.com/_redacted_/', '--project=_redacted_', '--scope', 'project', '--feed', '_redacted_', '--name', 'my-first-package', '--version', '0.0.1', '--path', '.', '--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', 'config', 'configure', 'consumption', 'container', 'cosmosdb', 'databoxedge', 'dla', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'identity', 'interactive', 'iot', 'keyvault', 'kusto', 'lab', 'managedservices', 'maps', 'marketplaceordering', 'monitor', '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.086        34       144
cli.azure.cli.core: acs                       0.012         6        48
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        11        60
cli.azure.cli.core: appconfig                 0.002         8        42
cli.azure.cli.core: appservice                0.031        73       260
cli.azure.cli.core: aro                       0.005         1         8
cli.azure.cli.core: backup                    0.013        16        58
cli.azure.cli.core: batch                     0.018        36       104
cli.azure.cli.core: batchai                   0.002        10        30
cli.azure.cli.core: billing                   0.004        19        52
cli.azure.cli.core: botservice                0.002        12        42
cli.azure.cli.core: cdn                       0.005        39       133
cli.azure.cli.core: cloud                     0.001         1         7
cli.azure.cli.core: cognitiveservices         0.002         8        31
cli.azure.cli.core: config                    0.001         2         7
cli.azure.cli.core: configure                 0.001         2         5
cli.azure.cli.core: consumption               0.001         8         9
cli.azure.cli.core: container                 0.005         1        11
cli.azure.cli.core: cosmosdb                  0.009        57       191
cli.azure.cli.core: databoxedge               0.003         5        27
cli.azure.cli.core: dla                       0.003        23        62
cli.azure.cli.core: dls                       0.002         7        41
cli.azure.cli.core: dms                       0.001         3        22
cli.azure.cli.core: eventgrid                 0.004        25        96
cli.azure.cli.core: eventhubs                 0.005        12        18
cli.azure.cli.core: extension                 0.001         1         7
cli.azure.cli.core: feedback                  0.000         1         2
cli.azure.cli.core: find                      0.001         1         1
cli.azure.cli.core: hdinsight                 0.004         8        39
cli.azure.cli.core: identity                  0.001         2        11
cli.azure.cli.core: interactive               0.000         1         1
cli.azure.cli.core: iot                       0.047        19        82
cli.azure.cli.core: keyvault                  0.006        22       131
cli.azure.cli.core: kusto                     0.001         3        14
cli.azure.cli.core: lab                       0.002        11        34
cli.azure.cli.core: managedservices           0.001         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.019        26        79
cli.azure.cli.core: netappfiles               0.004        17        94
cli.azure.cli.core: network                   0.302       101       324
cli.azure.cli.core: policyinsights            0.007         9        17
cli.azure.cli.core: privatedns                0.004        14        66
cli.azure.cli.core: profile                   0.001         2         9
cli.azure.cli.core: rdbms                     0.128        55       230
cli.azure.cli.core: redis                     0.002         5        27
cli.azure.cli.core: relay                     0.002        10        37
cli.azure.cli.core: resource                  0.008        47       209
cli.azure.cli.core: role                      0.002        17        61
cli.azure.cli.core: search                    0.001         7        22
cli.azure.cli.core: security                  0.004        48       104
cli.azure.cli.core: servicebus                0.006        13        15
cli.azure.cli.core: serviceconnector          0.013         8       129
cli.azure.cli.core: servicefabric             0.007        26        75
cli.azure.cli.core: signalr                   0.002         8        30
cli.azure.cli.core: sql                       0.012        55       207
cli.azure.cli.core: sqlvm                     0.028         4        20
cli.azure.cli.core: storage                   0.035        58       272
cli.azure.cli.core: synapse                   0.009        54       246
cli.azure.cli.core: util                      0.001         3         7
cli.azure.cli.core: vm                        0.032        58       265
cli.azure.cli.core: Total (63)                0.922      1167      4504
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
cli.azure.cli.core: azure-devops              0.139        60       192  /home/azuser/.azure/cliextensions/azure-devops
cli.azure.cli.core: Total (1)                 0.139        60       192
cli.azure.cli.core: Loaded 1217 groups, 4696 commands.
cli.azure.cli.core: Updated command index in 0.003 seconds.
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f28a517e7a0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/azuser/.azure/commands/2023-06-28.21-35-14.artifacts_universal_download.19666.log'.
az_command_data_logger: command args: artifacts universal download --organization {} --project={} --scope {} --feed {} --name {} --version {} --path {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7f28a51932e0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7f28a51d91b0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7f28a51d92d0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x7f28a43bbeb0>]
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f28a5e96ef0>, <function CLIQuery.handle_query_parameter at 0x7f28a5ccc280>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7f28a51d9240>, <function handler at 0x7f28a4196440>, <function DevCommandsLoader.post_parse_args at 0x7f28a10d0160>]
az_command_data_logger: extension name: azure-devops
az_command_data_logger: extension version: 0.26.0
cli.azext_devops.dev.common.artifacttool_updater: Checking for a new ArtifactTool
cli.azext_devops.dev.common.artifacttool_updater: Checking for ArtifactTool updates
cli.azext_devops.dev.common._credentials: Getting credential: azdevops-cli:https://dev.azure.com/_redacted_
keyring.backend: Loading KWallet
keyring.backend: Loading SecretService
keyring.backend: Loading Windows
keyring.backend: Loading chainer
keyring.backend: Loading libsecret
keyring.backend: Loading macOS
cli.azext_devops.dev.common.credential_store: Keyring backend : keyring.backends.fail.Keyring (priority: 0)
cli.azext_devops.dev.common.credential_store: Keyring not configured properly or package not found.Looking for credentials with key:azdevops-cli:https://dev.azure.com/_redacted_ in the file: /home/azuser/.azure/azuredevops/personalAccessTokens
cli.azext_devops.dev.common._credentials: Getting credential: azdevops-cli: default
cli.azext_devops.dev.common.credential_store: Keyring backend : keyring.backends.fail.Keyring (priority: 0)
cli.azext_devops.dev.common.credential_store: Keyring not configured properly or package not found.Looking for credentials with key:azdevops-cli: default in the file: /home/azuser/.azure/azuredevops/personalAccessTokens
cli.azure.cli.core: Current cloud config:
AzureCloud
cli.azext_devops.dev.common.services: trying to get token (temp) for tenant _redacted_ and user systemAssignedIdentity
cli.azext_devops.dev.common.services: not able to get token from az login
cli.azext_devops.dev.common.services: Tenant shouldn't be specified for managed identity account
Traceback (most recent call last):
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/services.py", line 157, in get_token_from_az_login
    raw = profile.get_raw_token(
  File "/home/azuser/.local/lib/python3.10/site-packages/azure/cli/core/_profile.py", line 368, in get_raw_token
    raise CLIError("Tenant shouldn't be specified for managed identity account")
knack.util.CLIError: Tenant shouldn't be specified for managed identity account
cli.azext_devops.dev.common._credentials: Getting credential: azdevops-cli:https://dev.azure.com/_redacted_
cli.azext_devops.dev.common.credential_store: Keyring backend : keyring.backends.fail.Keyring (priority: 0)
cli.azext_devops.dev.common.credential_store: Keyring not configured properly or package not found.Looking for credentials with key:azdevops-cli:https://dev.azure.com/_redacted_ in the file: /home/azuser/.azure/azuredevops/personalAccessTokens
cli.azext_devops.dev.common._credentials: Getting credential: azdevops-cli: default
cli.azext_devops.dev.common.credential_store: Keyring backend : keyring.backends.fail.Keyring (priority: 0)
cli.azext_devops.dev.common.credential_store: Keyring not configured properly or package not found.Looking for credentials with key:azdevops-cli: default in the file: /home/azuser/.azure/azuredevops/personalAccessTokens
cli.azext_devops.dev.common.artifacttool_updater: Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials.  Please see https://aka.ms/azure-devops-cli-auth for more information.
Traceback (most recent call last):
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 59, in _get_artifacttool
    release = _get_current_release(organization, override_version)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 155, in _get_current_release
    connection = get_connection(organization)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/services.py", line 43, in get_connection
    credentials = _get_credentials(organization)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/services.py", line 81, in _get_credentials
    raise get_authentication_error('Before you can run Azure DevOps commands, you need to run the login command'
knack.util.CLIError: Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials.  Please see https://aka.ms/azure-devops-cli-auth for more information.
cli.azext_devops.dev.common.exception_handler: handling generic error
cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 59, in _get_artifacttool
    release = _get_current_release(organization, override_version)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 155, in _get_current_release
    connection = get_connection(organization)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/services.py", line 43, in get_connection
    credentials = _get_credentials(organization)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/services.py", line 81, in _get_credentials
    raise get_authentication_error('Before you can run Azure DevOps commands, you need to run the login command'
knack.util.CLIError: Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials.  Please see https://aka.ms/azure-devops-cli-auth for more information.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/azuser/.local/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/home/azuser/.local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/home/azuser/.local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/home/azuser/.local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 718, in _run_job
    return cmd_copy.exception_handler(ex)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/exception_handler.py", line 31, in azure_devops_exception_handler
    reraise(*sys.exc_info())
  File "/usr/lib/python3/dist-packages/six.py", line 719, in reraise
    raise value
  File "/home/azuser/.local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
    result = cmd_copy(params)
  File "/home/azuser/.local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
    return self.handler(*args, **kwargs)
  File "/home/azuser/.local/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/artifacts/universal.py", line 98, in download_package
    return artifact_tool.download_universal(organization, project, feed, name, version, path, file_filter)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool.py", line 42, in download_universal
    return self.run_artifacttool(organization, args, "Downloading")
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool.py", line 57, in run_artifacttool
    artifacttool_dir = self._artifacttool_updater.get_latest_artifacttool(organization)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 43, in get_latest_artifacttool
    artifacttool_binary_path = self._get_artifacttool(organization)
  File "/home/azuser/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 62, in _get_artifacttool
    raise CLIError('Failed to update Universal Packages tooling.\n {}'.format(ex))
knack.util.CLIError: Failed to update Universal Packages tooling.
 Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials.  Please see https://aka.ms/azure-devops-cli-auth for more information.

cli.azure.cli.core.azclierror: Failed to update Universal Packages tooling.
 Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials.  Please see https://aka.ms/azure-devops-cli-auth for more information.
az_command_data_logger: Failed to update Universal Packages tooling.
 Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials.  Please see https://aka.ms/azure-devops-cli-auth for more information.
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f28a517e9e0>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 1.275 seconds (init: 0.115, invoke: 1.160)
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 3905 in cache
telemetry.check: Negative: The /home/azuser/.azure/telemetry.txt was modified at 2023-06-28 21:34:37.257854, which in less than 600.000000 s
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7ff1cb99a9e0>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 13.105 seconds (init: 0.116, invoke: 12.989)
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 3713 in cache
telemetry.check: Negative: The /home/azuser/.azure/telemetry.txt was modified at 2023-06-28 21:34:37.257854, which in less than 600.000000 s

Expected behavior

Azure cli should log in to azure-devops and download the artefact

Environment Summary

azure-cli                         2.49.0
core                              2.49.0
telemetry                          1.0.8

Extensions:
azure-devops                      0.26.0

Dependencies:
msal                              1.20.0
azure-mgmt-resource               22.0.0

Python location '/usr/bin/python3'
Extensions directory '/home/azuser/.azure/cliextensions'

Python (Linux) 3.10.6 (main, May 29 2023, 11:10:38) ÄGCC 11.3.0Å

Legal docs and information: aka.ms/AzureCliLegal


Your CLI is up-to-date.

Additional context

To Reproduce:

  1. Create a user-assigned managed identity on an Azure subscription.
  2. Add the user-assigned managed identity to the users of your Azure DevOps organization.
  3. Add the managed identity user to an Azure DevOps group.
  4. Create an Azure DevOps artifact feed and package.
  5. Add the Azure DevOps group, with the managed identity user as a member, to the feed's reader permissions.
  6. Create a virtual machine on the same subscription as the managed identity.
  7. Assign the user-assigned managed identity to the virtual machine.
  8. Install Azure CLI and run the failing command.
  9. The command will return the error described in this issue.

To Fix:

  1. Navigate to the following location:
    raise CLIError("Tenant shouldn't be specified for managed identity account")
  2. Replace the line
    raise CLIError("Please specify only one of subscription and tenant, not both")
    with
    tenant = False
  3. Re-run the az artifacts universal download command.
Author: JayDoubleu
Assignees: -
Labels:

bug, Service Attention, customer-reported, Installation, Artifacts, DevOps, Auto-Assign, Azure CLI Team, Auto-Resolve

Milestone: Backlog

@navba-MSFT
Copy link
Contributor

Adding service team to look into the devops issue.

@chaosssliu
Copy link

Hi Team, may I ask if there're any further actions regarding the fix promoted by @JayDoubleu ? I'm also encountering the same issue of using the plugin with a managed identity. Want to see when the fix will be included in future release.

@srinisudharsan
Copy link

I am facing the same issue as well. Can we please have a fix for this?

@yonzhan yonzhan removed the Azure CLI Team The command of the issue is owned by Azure CLI team label May 7, 2024
@threedot14
Copy link

Any update? Would like to use universal package with MSI as well.

@jiasli
Copy link
Member

jiasli commented Aug 27, 2024

The tenant argument of get_raw_token() is used for cross-tenant authentication for user and service principal accounts.

According to https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/managed-identities-faq#can-i-use-a-managed-identity-to-access-a-resource-in-a-different-directorytenant

Can I use a managed identity to access a resource in a different directory/tenant?
No, managed identities don't currently support cross-directory scenarios.

Also, according to https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/tutorial-windows-managed-identities-vm-access?pivots=identity-windows-mi-vm-access-arm#get-an-access-token, managed identity's http://169.254.169.254/metadata/identity/oauth2/token API doesn't support a tenant parameter.

When azure-devops extension calls get_raw_token(), it passes tenant unconditionally (not for cross-tenant authentication), which is a misuse:

https://github.com/Azure/azure-devops-cli-extension/blob/8eb5144ebcaa1119ed8be850ce43c096c43ead95/azure-devops/azext_devops/dev/common/services.py#L157-L158

It should not pass tenant.

@tpartanen
Copy link

Any updates on this? Having this same exact error, trying to use with user assigned managed identity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Artifacts az artifacts Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. DevOps Installation Service Attention This issue is responsible by Azure service team.
Projects
None yet
8 participants