WebApp:az webapp config appsettings - changing a slot setting to a non slot setting fails
Describe the bug If you create an app setting using the --slot-setting flag then delete the app setting and recreate it with the --setting flag Azure Portal still shows it with "Deployment slot setting" ticked.
To Reproduce
- Create a brand new app setting by running
az webapp config appsettings set --name "my-web-app" --resource-group "my-web-app-resource-group" --slot-settings MyAppSettingName="my-app-setting-value" -s stage - Refresh the Configuration in Azure Portal for the affected web app and confirm the new setting is there with 'Deployment slot setting' ticked
- Deleted the newly created app setting via Azure Portal and click save
- Refresh the Configuration in Azure Portal and confirm the new setting has disappeared
- Recreate the same app setting with the same name but not as a slot-setting by running
az webapp config appsettings set --name "my-web-app" --resource-group "my-web-app-resource-group" --settings MyAppSettingName="my-app-setting-value" -s stage - Refresh the Configuration in Azure Portal and you can see the app setting comes back but the 'Deployment slot setting' is still ticked, but it shouldn't be. However the response from the command line did show the app setting being created as a non slotSetting
[
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"slotSetting": false,
"value": "6.9.1"
},
{
"name": "MyAppSettingName",
**"slotSetting": false**,
"value": "my-app-setting-value"
}
]
To confim this is just caused on the second run I...
7. Created another brand new app setting with a different name that is not a slot setting by running
az webapp config appsettings set --name "my-web-app" --resource-group "my-web-app-resource-group" --settings MyNEWAppSettingName="my-app-setting-value" -s stage
8. Refreshed the Configuration in Azure Portal. Now I have two app settings:
MyAppSettingName: 'Deployment slot setting' ticked - not expected
MyNEWAppSettingName: 'Deployment slot setting' unticked - as expected
Expected behavior When running step 5 above the 'Deployment slot setting' should be unticked in Azure Portal
Environment summary CLI version 2.30.0 Powershell Version 7.0.4 Powershell Edition Core OS Microsoft Windows 10.0.19043
Additional context Running commands from Microsoft Code Terminal
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.
Issue Details
Describe the bug If you create an app setting using the --slot-setting flag then delete the app setting and recreate it with the --setting flag Azure Portal still shows it with "Deployment slot setting" ticked.
To Reproduce
- Create a brand new app setting by running
az webapp config appsettings set --name "my-web-app" --resource-group "my-web-app-resource-group" --slot-settings MyAppSettingName="my-app-setting-value" -s stage - Refresh the Configuration in Azure Portal for the affected web app and confirm the new setting is there with 'Deployment slot setting' ticked
- Deleted the newly created app setting via Azure Portal and click save
- Refresh the Configuration in Azure Portal and confirm the new setting has disappeared
- Recreate the same app setting with the same name but not as a slot-setting by running
az webapp config appsettings set --name "my-web-app" --resource-group "my-web-app-resource-group" --settings MyAppSettingName="my-app-setting-value" -s stage - Refresh the Configuration in Azure Portal and you can see the app setting comes back but the 'Deployment slot setting' is still ticked, but it shouldn't be. However the response from the command line did show the app setting being created as a non slotSetting
[
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"slotSetting": false,
"value": "6.9.1"
},
{
"name": "MyAppSettingName",
**"slotSetting": false**,
"value": "my-app-setting-value"
}
]
To confim this is just caused on the second run I...
7. Created another brand new app setting with a different name that is not a slot setting by running
az webapp config appsettings set --name "my-web-app" --resource-group "my-web-app-resource-group" --settings MyNEWAppSettingName="my-app-setting-value" -s stage
8. Refreshed the Configuration in Azure Portal. Now I have two app settings:
MyAppSettingName: 'Deployment slot setting' ticked - not expected
MyNEWAppSettingName: 'Deployment slot setting' unticked - as expected
Expected behavior When running step 5 above the 'Deployment slot setting' should be unticked in Azure Portal
Environment summary CLI version 2.30.0 Powershell Version 7.0.4 Powershell Edition Core OS Microsoft Windows 10.0.19043
Additional context Running commands from Microsoft Code Terminal
| Author: | marmul1 |
|---|---|
| Assignees: | - |
| Labels: |
|
| Milestone: | - |
Adding webapp service team to take a look.
@panchagnula - There is an issue with the delete operation in the portal. When a user deletes the slot setting on the portal, it doesn't actually delete from the backend configuration. I verified it in the slotConfigNames of the webapp in Azure Resource Explorer. Can you please loop Portal team.
@Kotasudhakarreddy if there is a portal issue can you use the report bug extension from portal which will trigger an email to them? alternately I can share the contact details offline for you to start an email thread. Thanks!
Yes, I have created a support request from Portal Sisira. Can you also please give me the contact details offline to start an email thread.
@Kotasudhakarreddy did you report this via ICM or email to the portal team already? what is the status?
This is partially an issue with the portal, partially an issue with the CLI. Deleting a setting via CLI will allow you to re-add the setting with a different slot setting. However, the CLI should overwrite or replace whatever the previous setting was. In fact, this is what happens when issuing a CLI command with the "--slot-settings" parameter, it will overwrite a previous slot setting (it will go from false, to true), but then running the command with the "--settings" parameter will not overwrite a previous slot setting (going from true to false), even though the response will show the slot setting is now false, it is not. Running the list command shows that the slot setting is still true, contrary to the response from the set command.

Using Azure Resource Explorer, I found that there is a separate webapp json called "slotConfigNames" which stores a list of app service setting names that are slot settings. Unchecking the slot setting in the portal or deleting a setting in the portal does not remove a setting name from this list. Adding a setting that is not a "slot setting" via the CLI will not remove that setting name from this list. However, deleting the setting via the CLI will remove it from this list, if it exists there.
@panchagnula I have not created any IcM for this. I have reported it to the portal team from Azure Portal. @b1ackhawk-uh60 has explained the real issue here. @panchagnula Can we transfer this issue to portal team from here?
There is definitely a portal issue here, but there is also a CLI issue that should not be ignored. Using the appropriate parameter in the CLI should make the requested change, not to mention the CLI is returning incorrect properties.
I'm also experiencing this issue, per the following:
- Set app settings in bulk with the CLI via a JSON file where all settings have
"slotSetting": "false" - See all app settings that were set are marked as deployment slot settings
- Any attempt to update settings, even using the
key=valueCLI syntax, fails to overwrite deployment slot setting attr although output from CLI command will showslotSetting: false
However, when I update app settings in bulk via key=value key2=value2 ... CLI syntax, deployment slot setting is appropriately disabled for the provided settings.
Are there any updates on resolving these issues? Thanks!
@SophieDeBenedetto
@panchagnula I have not created any IcM for this. I have reported it to the portal team from GitHub. @b1ackhawk-uh60 has explained the real issue here. @panchagnula Can we transfer this issue to portal team from here?
@Kotasudhakarreddy Portal team doesn't have a GitHub presence so this need to happen via ICM or email to them, so unsure how this was accomplished "I have reported it to the portal team from GitHub."
I'm also experiencing this issue, per the following:
- Set app settings in bulk with the CLI via a JSON file where all settings have
"slotSetting": "false"- See all app settings that were set are marked as deployment slot settings
- Any attempt to update settings, even using the
key=valueCLI syntax, fails to overwrite deployment slot setting attr although output from CLI command will showslotSetting: falseHowever, when I update app settings in bulk via
key=value key2=value2 ...CLI syntax, deployment slot setting is appropriately disabled for the provided settings.Are there any updates on resolving these issues? Thanks!
@SophieDeBenedetto could you share with me the order of commands (without adding any Sub or webapp details) you are using here. I want to understand the order of operations plus ensure there is no portal bulk update involved here. Thanks
Sure thing @panchagnula! See below.
- Bulk update app settings via JSON file
- JSON file looks like this:
# settings.json
[
{
"name": "SOME_VAR",
"value": "some_value",
"slotSetting": "false"
},
{
"name": "SOME_OTHER_VAR",
"value": "some_other_value",
"slotSetting": "false"
},
]
- With CLI command:
az webapp config appsettings delete -g my-group -n my-app --slot canary --settings @settings.json
- See output from the CLI command that looks like this:
[
{
"name": "SOME_VAR",
"slotSetting": false,
"value": "some_value"
},
{
"name": "SOME_OTHER_VAR",
"slotSetting": false,
"value": "some_other_value"
},
]
- Go to app settings for the app in the Azure portal and see that for those vars set from the JSON file, "deployment slot setting" is checked.
@SophieDeBenedetto
@panchagnula I have not created any IcM for this. I have reported it to the portal team from GitHub. @b1ackhawk-uh60 has explained the real issue here. @panchagnula Can we transfer this issue to portal team from here?
@Kotasudhakarreddy Portal team doesn't have a GitHub presence so this need to happen via ICM or email to them, so unsure how this was accomplished "I have reported it to the portal team from GitHub."
@panchagnula I have reported this to the portal team through support request option from portal.azure.com . I have wrongly mentioned as from GitHub. We have already discussed in our call as I have requested through portal.azure.com. Sorry for misleading with the comment.
Using Azure Resource Explorer, I found that there is a separate webapp json called "slotConfigNames" which stores a list of app service setting names that are slot settings.
API docs for Updating Slot Configuration Names: https://docs.microsoft.com/en-us/rest/api/appservice/web-apps/update-slot-configuration-names
Any estimate on when this will be fixed? It's been 2 years.
@jiasli @seligj95 Look likes @panchagnula is no longer part of development for this as she hasn't committed anything since 2022. Can you get this out of purgatory?
@yonzhan Looking for someone who's still active here to get a response.
@b1ackhawk-uh60 I'm working with the portal team to get this fixed as that is the true issue here. CLI works as expected - all it's doing is using the APIs with no additional logic. I opened a PR with a potential fix for this issue in the CLI specifically, but it doesn't make sense to add the additional logic there when the issue is the deletion from the portal. We try to avoid any additional CLI-specific validations where possible.
@seligj95 I appreciate the movement on this. I don't really understand your comment. Are you saying that the CLI is just invoking some process via the Portal? It appears from your PR, that the CLI issue should be resolved, regardless of what is happening in the portal. You keep mentioning the "real" issue being the portal, but that doesn't make sense to me.