-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Describe the bug
- task: AzureCLI@2
displayName: 'Assign Managed Identity and Update Container App'
inputs:
azureSubscription: $(serviceConnection)
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
az config set extension.use_dynamic_install=yes_without_prompt
az provider register --namespace Microsoft.App
# ASSIGN THE IDENTITY
az containerapp identity assign \
--name $(image-name) \
--resource-group $(resource-group) \
--user-assigned '$(managed-identity-name)'
this task in azure devops not working with cli version of 2.77. however it works locally with all the latest version like 2.76 and 2.7..
Related command
az containerapp identity assign
--name $(image-name)
--resource-group $(resource-group) \
--user-assigned '$(managed-identity-name)'
Errors
ERROR: unrecognized arguments:
Examples from AI knowledge base:
https://aka.ms/cli_ref
Read more about the command in reference docs
/home/vsts/work/_temp/azureclitaskscript1759214236821.sh: line 18: --user-assigned: command not found
Issue script & Debug output
ERROR: unrecognized arguments:
Examples from AI knowledge base:
https://aka.ms/cli_ref
Read more about the command in reference docs
/home/vsts/work/_temp/azureclitaskscript1759214236821.sh: line 18: --user-assigned: command not found
Expected behavior
should work
Environment Summary
/usr/bin/az --version
azure-cli 2.77.0
core 2.77.0
telemetry 1.1.0
Extensions:
azure-devops 1.0.2
Dependencies:
msal 1.34.0b1
azure-mgmt-resource 23.3.0
Python location '/opt/az/bin/python3'
Config directory '/home/vsts/.azure'
Extensions directory '/opt/az/azcliextensions'
Python (Linux) 3.13.7 (main, Aug 26 2025, 08:47:19) [GCC 13.3.0]
Additional context
No response