Setting App Configuration Values with Special Characters using Azure CLI

I recently ran into an issue when setting app settings via the “az functionapp config appsettings” command. The issue specifically occurs when there are spaces or special characters in the values:

If you are running into the same issue, the solution is to put the whole command in a string and then call it with eval. This will ensure that the quotes are handled correctly and your settings will be applied successfully.

You can use the following code to set your app settings values:

Using eval command will correctly handle the quotes and enable you to set values with spaces or other special characters.

I initially found the solution in this stackoverflow article: https://stackoverflow.com/questions/57762136/azure-cli-az-functionapp-config-appsettings-space-in-appsetting

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aymen Furter

I am a Cloud Solution Architect working for Microsoft. The views expressed on this site are mine alone and do not necessarily reflect the views of my employer.