Azure App Configuration: Centralised Settings
Where non-secret configuration belongs. Feature flags, labels for environments, refresh intervals, Microsoft Entra access, and how App Configuration combines with Key Vault for production-grade config management.
What App Configuration is β and how it differs from Key Vault
Azure App Configuration is the home for non-secret config. Things like the model name, the log level, the feature flags, the default temperature for the LLM. Stuff you change a lot, want to share between services, and donβt need to encrypt with HSMs.
Key Vault stores secrets; App Configuration stores everything else. Together they cover the full surface β the typical pattern is App Configuration with Key Vault references for the values that ARE secret.
Two killer features for AI-200:
- Labels β the same key can have different values per environment (dev, staging, prod) using labels.
- Feature flags β turn features on/off in production without a redeploy. Roll out to a percentage of users; turn off if something breaks.
Keys, values, labels
Key Label Value
app:settings:LogLevel (none) Information
app:settings:LogLevel staging Debug
app:settings:LogLevel prod Warning
app:settings:ModelName (none) gpt-4o-mini
app:settings:ModelName prod gpt-4o
features:NewRagPipeline (none) {"enabled":false}
features:NewRagPipeline prod {"enabled":true}
A SDK reads with both key and label. The same code with different labels gets different config:
from azure.appconfiguration import AzureAppConfigurationClient
from azure.identity import DefaultAzureCredential
client = AzureAppConfigurationClient(
base_url="https://roo-config.azconfig.io",
credential=DefaultAzureCredential(),
)
setting = client.get_configuration_setting(
key="app:settings:LogLevel",
label="prod",
)
print(setting.value) # "Warning"
Key Vault references β the integration
App Configuration values can reference Key Vault secrets. The value type is application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8:
{
"uri": "https://roo-kv.vault.azure.net/secrets/OpenAIKey"
}
When the SDK reads this key it follows the URI to Key Vault (using the consumerβs identity, not App Configurationβs). So you get a single read surface for all config β secret and non-secret β without duplicating Key Vault references in every appβs settings.
# When the SDK loads config, Key Vault references resolve to actual secrets
config = client.list_configuration_settings(label_filter="prod")
for s in config:
print(s.key, "->", s.value) # secrets resolved to live values
Feature flags
Feature flags let you turn behaviour on or off without redeploying.
{
"id": "NewRagPipeline",
"description": "Use the new pgvector RAG pipeline",
"enabled": false,
"conditions": {
"client_filters": [
{
"name": "Microsoft.Targeting",
"parameters": {
"Audience": {
"Users": ["alpha@contoso.com"],
"Groups": [{"Name": "InternalTesters", "RolloutPercentage": 100}],
"DefaultRolloutPercentage": 5
}
}
}
]
}
}
Three targeting filters built in:
| Filter | What it does |
|---|---|
| Targeting | Specific users, groups, or rollout percentages |
| TimeWindow | Enable between two dates / times |
| Percentage | Random % of traffic β A/B test gate |
from featuremanagement import FeatureManager
manager = FeatureManager(...)
if await manager.is_enabled("NewRagPipeline", user_context):
use_new_pipeline()
else:
use_old_pipeline()
Real-world example: Mira's gradual rollout
Mira launches a new vision model. Strategy:
- Feature flag
EnableNewVisionModelset to 5% rollout in production - Watch error rate, latency, accuracy in App Insights for 24 hours
- Bump to 25%, monitor 24 hours
- 50%, 100%
- If anything goes wrong at any stage, set the flag to 0% β instant kill switch, no redeploy
The feature flag value lives in App Configuration; the worker code is unchanged across the rollout.
Snapshots β point-in-time config
App Configuration supports snapshots β frozen, named copies of a labelβs config at a moment in time. Useful for:
- Pinning a deployment to a specific config version
- Auditing what production was configured to on a particular date
- Promoting config from dev to prod atomically (snapshot the dev label, copy as a prod label)
Authentication and authorisation
| Mode | Use |
|---|---|
| Connection string | Quick start; legacy |
| Microsoft Entra RBAC | Recommended β App Configuration Data Reader for read-only consumers |
az role assignment create \
--assignee $PRINCIPAL_ID \
--role "App Configuration Data Reader" \
--scope $(az appconfig show -n roo-config --query id -o tsv)
Built-in roles youβll see:
| Role | Permissions |
|---|---|
| App Configuration Data Reader | Read keys, values, labels, feature flags |
| App Configuration Data Owner | Read + write |
| App Configuration Reader (control plane) | Manage the resource itself |
Refresh strategies
App Configuration provides three refresh patterns in SDKs:
| Pattern | How | Use for |
|---|---|---|
| Automatic refresh | SDK polls a sentinel key; on change, refreshes config | Most apps β sentinel key changes whenever any config does |
| Push refresh via Event Grid | Event Grid fires Microsoft.AppConfiguration.KeyValueModified; your app subscribes and refreshes | Lower-latency invalidation for critical settings |
| Manual refresh | App calls refresh() on the configuration provider on demand | Custom rollouts |
Polling intervals are configurable; default is 30 seconds for most SDKs. Donβt poll too aggressively β it costs requests and barely helps.
When NOT to use App Configuration
Some configuration genuinely belongs at app-level:
| Type | Where it belongs |
|---|---|
| Connection strings to databases | App Configuration with Key Vault references for the password |
| API keys | Key Vault, referenced from App Configuration |
| Feature flags | App Configuration |
| Per-environment URLs (e.g., OpenAI deployment name) | App Configuration |
| Local-only paths or build-time constants | App Settings or env vars |
Key terms
Knowledge check
Theo's clinical assistant has different log levels in dev (`Debug`), staging (`Information`), and prod (`Warning`). The team wants one config store; the same code reads the right value in each environment. Which App Configuration feature fits?
Mira wants the OPENAI_API_KEY to be retrieved from Key Vault, but referenced through her single App Configuration store like all the other config. What's the right pattern?
Lin wants to roll out a new pgvector pipeline to 5% of users in production, then ramp to 25%, 50%, 100% over a week. He must be able to revert instantly if it breaks. What feature should he use?