Claude Code on Azure Microsoft Foundry — Complete Setup From a New Azure Account

Running Claude Code through Microsoft Azure Foundry instead of Anthropic's API — complete setup including the parts most tutorials skip. I started from a brand new Azure account. Hit the quota denial. Hit the subscription upgrade error. Hit the Pay-As-You-Go block. Got through all of it. This video shows the real path — including every blocker and how to get past them. Why run through Azure at all: If you're a solo engineer on a laptop — Anthropic direct is fine. If you're on a team where procurement needs to approve every new vendor, the security team wants everything inside the Azure compliance boundary, and finance wants AI costs on the Azure bill — Microsoft Foundry is the right path. Same Claude models. Same Claude Code experience. Everything running through your Azure subscription. What's covered: → Why Pay-As-You-Go is required before anything else — free trial accounts are explicitly blocked from Claude models → The quota denial you will hit on a new account and exactly how to fix it → Creating a Microsoft Foundry resource in eastus → Deploying Claude Sonnet 4.6 and Haiku 4.5 → Why you MUST pin model versions — the breaking change that hits teams silently → Getting your API key from Endpoints and keys → Five environment variables — no wizard on Foundry, just env vars → Why /login and /logout are disabled on Foundry → Microsoft Entra ID for teams — skip the API key entirely → Clearing conflicting Bedrock or Vertex AI variables that override Foundry → /status confirming Microsoft Foundry is active → Verifying in Azure Monitor and Cost Management AWS to Azure concept map included — IAM to Entra ID, CloudTrail to Azure Monitor, 30 seconds that saves hours of portal confusion. Source: code.claude.com/docs/en/microsoft-foundry Chapters: 0:00 — Why run through Azure 0:40 — AWS to Azure concept map 1:10 — Step 1: Upgrade to Pay-As-You-Go first 2:00 — Step 2: Create Foundry resource 3:30 — Step 3: Deploy Claude models + pin versions 5:00 — Step 4: Get your API key 5:30 — Step 5: Set environment variables 7:30 — Step 6: Entra ID for teams 8:00 — Step 7: Test and verify 9:00 — Wrap-up #claudecode #microsoftfoundry #azureclaudecode #claudecodeazure #azureaifoundry #aiengineering #anthropicazure #llmops #claudesonnet #azuresetup