Open prashant-bhande opened 2 months ago
Hi @prashant-bhande,
2.62.0 is not the latest Azure CLI(2.63.0).
If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.
Thank you for opening this issue, we will look into it.
Here are some similar issues that might help you. Please check if they can solve your problem.
Describe the bug
az rest cli commands fails in azure ubuntu agents. Agent-Pool : Azure Pipeline Agent specification : ubuntu-latest Azure-cli version : 2.62.0
Related command
az rest --method patch --uri $url --headers $headers --body
uri - https://graph.microsoft.com/v1.0/applications/xxxxxxxx-xxxxxx headers - '{"Content-Type":"application/json"}' | ConvertTo-Json body(payload) - { "api": { "oauth2PermissionScopes": [ { "adminConsentDisplayName": "Access on behalf of a user", "userConsentDisplayName": "Access on behalf of a user", "adminConsentDescription": "Access on behalf of a user", "userConsentDescription": "Access on behalf of a user", "type": "User", "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx", "isEnabled": true, "value": "access_as_a_user" } ] } }
Errors
ERROR: The command failed with an unexpected error. Here is the traceback: ERROR: not enough values to unpack (expected 2, got 1) Traceback (most recent call last): File "/opt/az/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke cmd_result = self.invocation.execute(args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 664, in execute raise ex File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 701, in _run_job result = cmd_copy(params) ^^^^^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 334, in call return self.handler(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler return op(command_args) ^^^^^^^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/command_modules/util/custom.py", line 24, in rest_call r = send_raw_request(cmd.cli_ctx, method, url, headers, uri_parameters, body, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/core/util.py", line 877, in send_raw_request result.update(temp) File "", line 954, in update
ValueError: not enough values to unpack (expected 2, got 1)
Issue script & Debug output
NA
Expected behavior
az rest cli commands should be executed on ubuntu agent
Environment Summary
azure-cli 2.62.0 core 2.62.0 telemetry 1.1.0 Extensions: azure-devops 1.0.1 Dependencies: msal 1.28.1 azure-mgmt-resource 23.1.1 Python location '/opt/az/bin/python3'
Additional context
No response