What this thread does
Do first: use az webapp config appsettings set with --slot-settings to mark settings as deployment slot settings, then inspect the source and target configuration separately.
Short answer
As of November 2026, use current App Service slot and Azure CLI docs. App settings can be configured to stick to a slot. A slot swap applies target settings to all source instances so you can validate that the source slot works with the target slot's settings; temporary source-side production values during preview are expected (swap lifecycle).
Choose / don't choose
- Separate backing services per slot: choose sticky database/service endpoints and environment identity. Don't let nonproduction values travel with promoted code.
- Release-owned configuration: choose ordinary swappable app settings when values must follow that release; don't mark everything sticky without reviewing ownership.
- Global default-stickiness override: use only for a deliberate platform-settings policy; there is no fine-grained control for specific setting types (reference).
Not for: Docker Compose interpolation; see docker-compose-variable-is-not-set-defaulting-to-blank-string-env-file.
Settings that matter
| Setting or flag | Value / default | Applies to | Source |
|---|---|---|---|
--slot | Slot name; omitted means production | Current az webapp config appsettings | CLI |
--slot-settings | Space-separated KEY=VALUE pairs or @file; adds values and marks them as Deployment slot setting | Current appsettings set CLI | CLI |
--settings | Ordinary KEY=VALUE app settings; distinguish from the slot-setting set | Current appsettings set CLI | CLI |
WEBSITE_OVERRIDE_PRESERVE_DEFAULT_STICKY_SLOT_SETTINGS | Default true; false or 0 on every slot makes the documented normally sticky settings swappable as a group | Current App Service slots | reference, scope |
WEBSITE_SWAP_WARMUP_PING_PATH | Default /; choose an application readiness path such as /statuscheck | Current App Service swap | reference |
WEBSITE_SWAP_WARMUP_PING_STATUSES | Valid response codes for swap warm-up; restrict to intended statuses, e.g. 200,202 | Current App Service swap | reference |
Example non-secret setting: az webapp config appsettings set --resource-group GROUP --name APP --slot staging --slot-settings mySetting=value. The CLI reference defines --slot-settings as key/value input. Follow the installed CLI's documented input and inspect the resulting slot flag (CLI).
Order of operations
1. Inspect both slots with az webapp config appsettings list using the appropriate slot selector. Compare actual values and slot-setting metadata, including database/connection-string ownership; review the global override (CLI, slot rules). 2. Run az webapp deployment slot swap with explicit source, target and --action preview. Target settings apply to source instances; the source slot is warmed up before swap completion. Preview pauses before the switch (swap procedure). 3. Inspect the incoming code under target configuration. Only complete with --action swap when those bindings and readiness are correct. Traffic then switches; after the source slot receives the pre-swap app, App Service applies all settings and restarts instances (swap lifecycle). 4. Inspect both final slots. If a real post-swap value is wrong, compare sticky flags, slot selector, startup-time overrides and backing-service selection before repeating swaps. Vitor Leitao's August 26, 2025 incident records sticky values moving unexpectedly; he reports that Azure Support confirmed an issue on their end, then reports on September 1, 2025 that the Azure Product Team resolved it, not a universal configuration fix.
Known failures and fixes
| Error or symptom | Cause | Fix | Source |
|---|---|---|---|
| Source shows production configuration during preview | The source slot is warmed up before swap completion | Inspect phase and final slot ownership; do not treat this transient observation alone as failed stickiness | swap lifecycle |
configuration settings have been prepared for swap | First phase finished but second phase has not happened; a swap can also have failed | Complete or reset the pending swap before another site update | troubleshoot swaps |
| Sticky values remain wrong after completion | Incorrect setting metadata/selection or a service incident | Preserve before/after metadata, restore intended values and investigate service health/support; don't assume another swap restores every value | Leitao report, slot rules |
Missing
- The app's configuration provider and actual database settings are unspecified; process-level overrides can differ from portal values.
- No universal fixed release is established for the dated service incident. Current documentation and that report should not be treated as the same event.
Checked
2026-11-12; current docs, November 2026. Slot lifecycle, CLI, app-setting reference and dated Leitao incident discussion read. No slot settings or traffic changed.
Started from a post by @Microsoft, packaged by the editor. Original post