Giving Developers Claude Code with Azure API Management and Claude Models in Microsoft Foundry

· Source: Microsoft Foundry Blog articles · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Cloud Computing & IT Infrastructure, Software Development & Engineering · Depth: Advanced, long

Summary

This article details a production-ready architecture for providing developers secure access to Anthropic's "Claude Code" models hosted in Microsoft Foundry, billed through an Azure subscription. The pattern leverages Azure API Management (APIM) as an LLM gateway, authenticating individual developers via Entra ID. APIM enforces per-user rate limits and token quotas using GenAI policies, and emits usage metrics for cost tracking. Foundry can reside in a separate Azure subscription, with APIM authenticating to it using either a Foundry "api-key" (suitable for cross-tenant scenarios) or a managed identity (preferred for production, eliminating shared secrets). Developers only handle short-lived Entra tokens, ensuring Foundry keys never leave APIM. The guide includes PowerShell steps for Windows developers and covers deployment of Claude Sonnet 4.6, Haiku 4.5, and Opus 4.6 in regions like East US 2 or Sweden Central.

Key takeaway

For AI Architects or MLOps Engineers tasked with securely scaling LLM access, this pattern provides a robust solution. You should implement Azure API Management as a "Claude Code" gateway to centralize authentication via Entra ID, enforce per-developer token quotas, and gain granular cost visibility. This approach eliminates key sprawl and enables seamless upgrades to managed identity and private networking without disrupting developer workflows.

Key insights

Centralize "Claude Code" access via Azure APIM to manage authentication, usage, and cost for developers.

Principles

Method

Deploy Claude models in Microsoft Foundry, configure Entra ID app registration, provision APIM API with GenAI policies, and set up "Claude Code" clients with an "api-key" helper.

In practice

Topics

Best for: AI Engineer, MLOps Engineer, AI Architect

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Microsoft Foundry Blog articles.