A

Azure AI Foundry Provider Settings

Configure Claude Code to use Azure AI Foundry (formerly Azure OpenAI) as the model provider. Run Claude models through your Azure subscription for enterprise security, private networking, and centralized Azure billing.

SettingCommunityinfrastructurev1.0.0MIT
0 views0 copies

Provider Configuration

# Required: Azure AI Foundry settings export CLAUDE_CODE_USE_AZURE=1 export AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com export AZURE_OPENAI_API_KEY=your-azure-api-key # Optional: specify deployment names export CLAUDE_CODE_AZURE_MODEL=claude-sonnet-4-20250514

Settings File

{ "env": { "CLAUDE_CODE_USE_AZURE": "1", "AZURE_OPENAI_ENDPOINT": "https://your-resource.openai.azure.com", "AZURE_OPENAI_API_KEY": "your-azure-api-key" }, "preferences": { "model": "claude-sonnet-4-20250514" } }

Prerequisites

  1. Azure Subscription with Azure AI Foundry resource
  2. Model Deployment: Deploy Claude models in your AI Foundry resource
  3. API Key: Found in Azure Portal > Your AI Foundry Resource > Keys and Endpoint
  4. Network: Ensure your network allows connections to the endpoint

Authentication Options

API Key (Simple)

export AZURE_OPENAI_API_KEY=your-key-here

Azure AD / Managed Identity (Enterprise)

export AZURE_USE_MANAGED_IDENTITY=1 # Authenticate via: az login

Available Models

ModelDeployment NameUse Case
Claude Opus 4claude-opus-4-20250514Complex reasoning, research
Claude Sonnet 4claude-sonnet-4-20250514Balanced performance
Claude Haiku 4claude-haiku-4-20250514Fast, cost-effective

Troubleshooting

IssueSolution
401 UnauthorizedVerify API key in Azure Portal
404 Not FoundCheck model deployment name matches
429 Rate LimitedIncrease TPM quota in Azure Portal
Connection refusedCheck firewall/NSG rules

Enterprise Benefits

  • Data stays within your Azure region
  • Private endpoint support for VNet isolation
  • Azure AD authentication and RBAC
  • Consolidated billing through Azure invoicing
  • Compliance certifications (SOC 2, HIPAA, etc.)
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates