Key rotation
Two secrets in your stack benefit from periodic rotation: the admin key (gates the dashboard) and the AAD app client secret (used by Teams SSO).
Admin key
Rotate from the dashboard:
- Open the dashboard.
- Click Rotate admin key in the Settings panel.
- The new key is shown once. Copy it to your password manager.
- All existing sessions are invalidated immediately.
- Re-log-in with the new key.
The rotation writes the new value to your Key Vault as admin-key. The customer-runtime reads from KV first (5-second cache), so the new key takes effect within seconds across all instances.
AAD app client secret
The auto-created AAD app secret has a 90-day expiry. Before expiry:
# Generate a new secretNEW_SECRET=$(az ad app credential reset \ --id <your-aad-app-object-id> \ --display-name "PointOfContactAI Teams SSO secret (rotated $(date +%Y-%m-%d))" \ --years 0 \ --query password -o tsv)
# Upsert to KVaz keyvault secret set \ --vault-name pocaikv{stack-hash} \ --name AadAppClientSecret \ --value "$NEW_SECRET"
# Restart the Function App to flush the secret cacheaz functionapp restart -n pocai-fa-{stack-hash} -g mrg-pointofcontactai-{guid}The customer-runtime reads AadAppClientSecret from KV with a 5-minute cache; the restart forces an immediate refresh.
(Auto-rotation lands in v1.1 — we’ll PATCH the customer FA + KV at day 75 of each cycle, sending an email confirmation.)