-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Updating tags with az ad sp update
runs into trace
#23027
Comments
@jiasli for awareness |
This is a known issue that generic update argument |
Thanks for looking into it! Any ETA of 2.38.0 ? |
Official Release: 07/05/2022 |
Thanks, If you don't mind, I'd like to keep this open till 2.38.0 is released so I can test with the new version. |
with 2.38.0 in combination with PowerShell (pwsh) I only got it to work by feeding the command a minimized json file, with the Tags in a JSON array construct [object]$TagConfig = @{tags=@("MyTag1","MyTag2")}
$TagConfigJson = (ConvertTo-Json $TagConfig.tags -Depth 10 -Compress) > ".temp-body-tags.json"
$mycommand = az ad sp update --id $spn.id --set tags="@.temp-body-tags.json" | ConvertFrom-Cli The ["MyTag1","MyTag2"] It did NOT work when:
{"tags":["MyTag1","MyTag2"]} This is probably why the release notes state:
All in all a bit awkward, but it works. Tags key is filled now: az ad sp show --id $app.appId |
For PowerShell quoting issue, you may refer to https://github.com/Azure/azure-cli/blob/dev/doc/quoting-issues-with-powershell.md. It described how to pass JSON strings.
As described in #22798, the supported syntax for
If you want to directly use |
So I can confirm this works with
for
I am going ahead and close this issue as it seems to be resolved by |
I am going ahead and close this issue as it seems to be resolved by 2.38 |
Describe the bug
Running
az ad sp update --id $app_id --add tags WindowsAzureActiveDirectoryIntegratedApp
runs into trace with cli version2.37.0
(tested via rpm and container)
Command Name
az ad sp update --id $app_id --add tags WindowsAzureActiveDirectoryIntegratedApp
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
DISPLAYNAME=my_SP_test01
app_id=$(az ad app list --display-name $DISPLAYNAME --query [].appId -o tsv)
Expected Behavior
Tags can either be added with the cli >=
2.37.0
and/or https://docs.microsoft.com/en-us/cli/azure/microsoft-graph-migration outlines alternative stepsEnvironment Summary
Additional Context
This works still with az cli
2.35.0
The text was updated successfully, but these errors were encountered: