What Are APIM Named Values? Secret Storage Explained
APIM named values hold the backend keys and secrets Azure API Management policies use. Learn the three types, why Key Vault references help, and their limits.
APIM named values are a global collection of name and value pairs inside an Azure API Management instance. Policies reference them by display name, so one value can feed many APIs. They come in three types: plain, secret and key vault. Secret and key vault named values are where backend API keys, connection strings and model provider keys usually live, which is why the Azure APIM flaw CVE-2026-139934 put them at the top of Microsoft's list of exposed data.
What are APIM named values?
Named values are reusable constants and secrets that Azure API Management policies can read. Instead of writing a backend key into every policy, you store it once as a named value and reference it where needed.
Microsoft documents three value types:
- Plain: a literal string or a policy expression. Visible to anyone who can read the configuration.
- Secret: a literal string or policy expression that API Management encrypts at rest. Shown masked in the portal.
- Key vault: the identifier of a secret in Azure Key Vault. APIM fetches the value through a managed identity and caches it.
The display name is what policies use. If you rename the display name, Microsoft says policies that reference it update automatically. The underlying identifier does not change.
Why do policies need secrets at all?
An API gateway sits between callers and backends. To call a backend on the caller's behalf it often has to present something the backend trusts: an API key header, a basic auth credential, a bearer token, or a client certificate. Policies such as set-header and set-backend-service inject that credential into the outbound request. The credential has to come from somewhere, and named values are the place Microsoft built for it.
That design concentrates risk. The Cloud Security Alliance's research note on the November 2026 incident describes the gateway as holding "credentials for nearly everything behind it." A stolen named value is a stolen backend credential, and the attacker no longer needs the gateway. They call the backend directly from any network the backend accepts, until the issuer revokes the credential.
How does a key vault named value differ from a secret?
A secret named value stores the encrypted value inside API Management. A key vault named value stores only a pointer; the value stays in Azure Key Vault and APIM reads it with its managed identity when policies run.
Microsoft recommends key vault references for three reasons it lists in its documentation:
- Secrets stored in a vault can be reused across services.
- Key Vault supports granular access policies and Azure RBAC on each secret.
- A secret updated in the vault is picked up by APIM automatically. Microsoft says the named value refreshes within four hours, or immediately if you trigger a refresh from the portal or the management REST API.
Three details matter when you set this up. The managed identity needs Get and List permission on secrets, either through a Key Vault access policy or the Key Vault Secrets User role. If the vault firewall is on, you must use the system-assigned identity and enable the trusted Microsoft services bypass. And the secret identifier must be entered without a version, otherwise APIM pins the old version and rotation in the vault never reaches the gateway.
Does a key vault reference protect the secret from an APIM compromise?
No. It reduces the number of places the raw value is stored, and it lets you rotate centrally, but it does not stop someone who controls the APIM management plane from reading the value.
Anders Kristiansen's analysis of the November 2026 incident makes the point from Microsoft's own documentation: anyone who can edit policies can read named values, and request tracing can reveal Key Vault-backed values. If an attacker reaches administrative operations, as Microsoft confirmed happened before November 19, 2026, the attacker can list named values, write a policy that echoes one, or enable tracing. Microsoft's remediation advice for that incident was to rotate secrets stored in APIM and the Key Vault secrets APIM references, because both were reachable through the gateway's administrative plane.
The right mental model: a key vault reference moves the secret's lifecycle to Key Vault. It does not move the secret's exposure out of APIM.
What else does APIM store that behaves like a named value?
Microsoft's list of information that may have been exposed in the APIM Classic incident went beyond named values:
- Subscription keys: the keys API consumers present to call your published APIs. Each subscription has a primary and secondary key.
- Identity provider client secrets: the app registration secrets used for developer portal sign-in with Entra ID, Azure AD B2C or external providers.
- OpenID Connect provider client secrets: the same for OIDC providers configured in APIM.
- Direct management API tokens: SharedAccessSignature tokens signed with the instance's tenant access key for the legacy management endpoint.
Microsoft's rotation guide, as summarized by CSO Online and Ostorlab, adds backend credentials (headers, query parameters, client certificates), OAuth 2.0 authorization server client secrets, logger connection strings such as Event Hubs, and credentials written directly into policy XML. That last category is the hardest to inventory because nothing tags it as a secret. Search policy text for header values, connection strings and keys that should have been named values.
How do you inventory the named values in an instance?
Start with the SKU, because the November 2026 flaw affected only Classic tiers (Developer, Basic, Standard and Premium). The Azure CLI commands below are adapted from Microsoft's rotation guide as reproduced by Ostorlab.
az apim list --subscription <subscription-id> \
--query "[].{name:name, resourceGroup:resourceGroup}" --output table
az apim show --name <apim-name> --resource-group <resource-group> \
--query "{sku:sku.name, provisioningState:provisioningState}" --output table
az apim nv list --service-name <apim-name> --resource-group <resource-group> --output table
For every secret or key vault named value, record where the real credential is issued (which backend, which app registration, which vault). That map is the input to rotating Azure API Management credentials in the right order. For a tenant-wide view, Azure Resource Graph can list every Microsoft.ApiManagement/service resource across the subscriptions you can read.
What should you change going forward?
Three changes reduce how much a future management-plane bug can take:
- Prefer managed identity over stored keys wherever the backend supports Entra authentication. Microsoft's own AI gateway guidance documents both options; the managed identity path leaves no key in APIM to steal.
- Move remaining secrets to key vault references, with versionless identifiers, so rotation happens in one place and APIM follows within four hours.
- Restrict who can edit policies and who can enable request tracing, since both expose named values regardless of type.
None of that replaces reading the Service Health notification when Microsoft sends one. The incident that made named values a headline reached customers through Azure Service Health first, and the public CVE followed two weeks later.