{"name":"ANTHROPIC_FOUNDRY_RESOURCE","slug":"anthropic-foundry-resource","family":"env","title":"Environment variables","noun":"environment variable","description":"Microsoft Foundry resource name (for example, `my-resource`). Required if `ANTHROPIC_FOUNDRY_BASE_URL` is not set (see [Microsoft Foundry](\/docs\/en\/microsoft-foundry))","description_source":"docs","described_by":{"doc":"claude-code\/env-vars","title":"Environment variables"},"presence":{"first_seen":"2.1.138","removed_in":null,"in_current_build":true,"newest_mined":"2.1.309","builds":150,"mined_builds":150,"first_cited":{"version":"2.1.284","released_at":"2026-09-28 17:11:59","spans":1}},"aliases":[],"entries":[{"version":"2.1.284","anchor":"anthropic-foundry-resource-is-validated-before-building-the","heading":"Invalid Microsoft Foundry resource names are now rejected","line":"Claude Code now builds a Microsoft Foundry address from `ANTHROPIC_FOUNDRY_RESOURCE` only if the name is 2 to 64 letters, digits or hyphens","released_at":"2026-09-28 17:11:59","reason":"found in this entry's text, named in this entry"},{"version":"2.1.284","anchor":"anthropic-foundry-resource-is-validated-and-passed-to-the-fo","heading":"ANTHROPIC_FOUNDRY_RESOURCE must now be a resource name, not a URL","line":"Without `ANTHROPIC_FOUNDRY_BASE_URL`, Claude Code rejects a URL or host name in `ANTHROPIC_FOUNDRY_RESOURCE` with a clear error","released_at":"2026-09-28 17:11:59","reason":"found in this entry's text, named in this entry"}],"entries_total":2,"docs":[{"source":"claude-code","path":"env-vars","title":"Environment variables","documented":true},{"source":"api","path":"build-with-claude\/claude-in-microsoft-foundry","title":"claude-in-microsoft-foundry","documented":false},{"source":"api","path":"cli-sdks-libraries\/sdks\/go","title":"go","documented":false},{"source":"claude-code","path":"changelog","title":"Claude Code changelog","documented":false},{"source":"claude-code","path":"errors","title":"Error reference","documented":false},{"source":"claude-code","path":"github-actions-cloud-providers","title":"Use Claude Code GitHub Actions with cloud providers","documented":false},{"source":"claude-code","path":"microsoft-foundry","title":"Claude Code on Microsoft Foundry","documented":false}],"docs_total":7,"gates":[],"related":[{"name":"ANTHROPIC_FOUNDRY_API_KEY","slug":"anthropic-foundry-api-key","description":"API key for Microsoft Foundry authentication (see [Microsoft Foundry](\/docs\/en\/microsoft-foundry))"},{"name":"ANTHROPIC_FOUNDRY_AUTH_TOKEN","slug":"anthropic-foundry-auth-token","description":"Bearer token for Microsoft Foundry authentication, such as a Microsoft Entra access token. Claude Code sends it as the `Authorization: Bearer` header. Takes precedence over `ANTHROPIC_FOUNDRY_API_KEY` and over the Azure default credential chain. See [Microsoft Foundry](\/docs\/en\/microsoft-foundry). Requires Claude Code v2.1.203 or later"},{"name":"ANTHROPIC_FOUNDRY_BASE_URL","slug":"anthropic-foundry-base-url","description":"Full base URL for the Microsoft Foundry resource (for example, `https:\/\/my-resource.services.ai.azure.com\/anthropic`). Alternative to `ANTHROPIC_FOUNDRY_RESOURCE` (see [Microsoft Foundry](\/docs\/en\/microsoft-foundry))"}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/anthropic-foundry-resource","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}