Trying to add new user in Microsoft.Targeting filter, but getting error: "Some of your feature flags are not valid. Please navigate to Advanced Edit for more details."
Advanced Edit output using my script
Anticipated Result (The expected output should resemble the screenshot provided below):
Az Cli Command :
az appconfig feature filter update --connection-string <<Endpoint Connection String here>> --feature featureA --filter-name Microsoft.Targeting --filter-parameters '"\"Audience\": {\"Users\": [\"user1\",\"user2\",\"user3\"],\"Groups\": [],\"DefaultRolloutPercentage\": 50}}"'
Unable to read Json file data and pass those values to --function-parameters value
The syntax for adding filter parameters is in the form parameterName=value
. If the "value" is JSON, then it must be escaped. More information on this can be found in the command documentation here.
So the command would work as expected if rewritten as follows:
az appconfig feature filter update --connection-string <<Endpoint Connection String here>> --feature featureA --filter-name Microsoft.Targeting --filter-parameters 'Audience={\"Users\": [\"user1\",\"user2\",\"user3\"],\"Groups\": [],\"DefaultRolloutPercentage\": 50}'
I hope this helps, thanks!