az webapp config: Configure App Service
az webapp config and its appsettings subcommand set the runtime configuration of an App Service app.
Before or after a deploy, a pipeline pushes environment variables and runtime settings to the app. config appsettings set is the keyless way to do it.
What it does
az webapp config manages an App Service app configuration. The config appsettings set subcommand creates or updates application settings (environment variables), while config container sets the image for a containerized app.
Common usage
az webapp config appsettings set \
--resource-group rg-app --name web-ci \
--settings NODE_ENV=production API_URL=https://api.example.com
# point a container app at a new image
az webapp config container set \
-g rg-app -n web-ci \
--container-image-name myregistry.azurecr.io/web:sha-abc123Subcommands and flags
| Subcommand / Flag | What it does |
|---|---|
| config appsettings set | Create or update app settings |
| config appsettings list | List current app settings |
| config container set | Set the container image and registry |
| --settings <k=v> | One or more key=value settings |
| --resource-group, -g / --name, -n | Target app |
In CI
Reference Key Vault secrets from app settings with @Microsoft.KeyVault(...) syntax so values are not stored in plaintext. Use config appsettings list with --query to assert a setting after deploy. App settings replace process restarts, so the app reloads with the new values.
Common errors in CI
"ResourceNotFound: The Resource 'Microsoft.Web/sites/...' was not found" means a wrong app name or group. "AuthorizationFailed" means the identity lacks Contributor on the app. A setting that reads back blank often means a quoting issue in the shell splitting the key=value pair.