{"version":"2.1.329","anchor":"foundry-pinned-api-key-refused-off-its-resource","canonical_anchor":"foundry-pinned-api-key-refused-off-its-resource","heading":"Pinned Microsoft Foundry keys are refused away from their own resource","tier":"notice","area":"Elsewhere","scope":"both","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.329\/e\/foundry-pinned-api-key-refused-off-its-resource","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.329","markdown":"### Pinned Microsoft Foundry keys are refused away from their own resource\n\nClaude Code now checks that a pinned Microsoft Foundry key is only sent to its own resource, in normal sessions and in the eval environment\n\n**Unclear.** Exactly when the check refuses a key is not clear.\n\n**What**\n\nMicrosoft Foundry is one of the cloud services Claude Code can send requests through. `ANTHROPIC_FOUNDRY_RESOURCE` names the Foundry resource, and `ANTHROPIC_FOUNDRY_BASE_URL` gives its full address instead. A new check stops a key that is pinned, meaning tied, to one resource from being used against another.\n\n- **Normal sessions**: when `ANTHROPIC_FOUNDRY_RESOURCE` is set and no Entra token provider (Microsoft's sign-in system) is in use, Claude Code calls `refusePinnedFoundryKeyOffItsResource`. The same check also wraps the token provider.\n\n- **Eval environment**: when Claude Code builds the separate environment for an eval child process, it checks `ANTHROPIC_FOUNDRY_RESOURCE` and `ANTHROPIC_FOUNDRY_BASE_URL` through `pinnedFoundryKeyRefusal`. If the check refuses, a set of credential environment variables is dropped.\n\n**Why**\n\nIf you use Microsoft Foundry and set both a key and a resource, a mismatched setup is now refused instead of sending the key somewhere it does not belong. If requests start failing after this release, check that your key matches the resource or address you have configured.\n\n- Area: Elsewhere\n- Names: `ANTHROPIC_FOUNDRY_RESOURCE`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: both\n- Heads-up: yes"}