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.
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
- Azure Subscription with Azure AI Foundry resource
- Model Deployment: Deploy Claude models in your AI Foundry resource
- API Key: Found in Azure Portal > Your AI Foundry Resource > Keys and Endpoint
- 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
| Model | Deployment Name | Use Case |
|---|---|---|
| Claude Opus 4 | claude-opus-4-20250514 | Complex reasoning, research |
| Claude Sonnet 4 | claude-sonnet-4-20250514 | Balanced performance |
| Claude Haiku 4 | claude-haiku-4-20250514 | Fast, cost-effective |
Troubleshooting
| Issue | Solution |
|---|---|
401 Unauthorized | Verify API key in Azure Portal |
404 Not Found | Check model deployment name matches |
429 Rate Limited | Increase TPM quota in Azure Portal |
| Connection refused | Check 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.)
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Project Standards Config
Claude Code settings preset that enforces consistent coding standards. Configures TypeScript strict mode, ESLint rules, Prettier formatting, and naming conventions.
Bedrock Configuration Blueprint
All-in-one setting covering configure, claude, code, amazon. Includes structured workflows, validation checks, and reusable patterns for api.
Refined Corporate Preset
Production-ready setting that handles configure, proxy, settings, corporate. Includes structured workflows, validation checks, and reusable patterns for api.