Enterprise controls for Claude Desktop through Entra ID, APIM and Microsoft Foundry
#Cloud

Enterprise controls for Claude Desktop through Entra ID, APIM and Microsoft Foundry

Cloud Reporter
4 min read

A Microsoft pattern puts corporate sign-in, policy enforcement and per-user audit trails in front of Claude Desktop through managed Azure services.

Featured image

Change

Microsoft Community Hub described a Claude Desktop pattern June 15 that uses Microsoft Entra ID, Azure API Management and Microsoft Foundry to give enterprise users access to Claude models through corporate sign-in.

The design uses Claude Desktop 1.5 or later with Gateway SSO. A user signs in through a browser with OpenID Connect and PKCE. Claude Desktop sends an ID token to Azure API Management, or APIM. APIM checks the token against Entra ID, drops the user's Authorization header, adds a Foundry credential and calls the Anthropic endpoint in Foundry.

That flow gives security teams a policy gateway without a custom backend service. Developers keep Claude Desktop. Platform teams keep identity, logging, rate limits and revocation in Azure.

Gateway design

An administrator first creates a single-tenant Entra app registration for Claude Desktop. The app needs a public PKCE client and a loopback redirect URI under Mobile and desktop applications. A Web platform redirect causes token exchange failures because Claude Desktop does not send a client secret.

APIM then hosts an HTTP API with a /claude suffix. The key operation is POST /v1/messages, which proxies Claude Desktop requests to Foundry's Anthropic-compatible route. Teams can add GET /v1/models if they want Claude Desktop model discovery, although Foundry's Anthropic surface may require an APIM stub for that endpoint.

The APIM policy does the control-plane work. The validate-jwt policy checks the user's Entra token through OpenID Connect discovery. The policy accepts the token when the audience matches the Claude Desktop app's client ID and the issuer matches the tenant.

APIM then calls Foundry. Teams can store a Foundry API key as an APIM secret named value, or an administrator can enable APIM's system-assigned managed identity and grant it the Foundry User role. The managed identity route uses APIM's authentication-managed-identity policy and removes Foundry key rotation from endpoint operations.

Provider comparison

The API-key path fits a quick proof of concept. Engineers paste a shared Foundry key into each Claude Desktop config. That setup gets a model running fast, then it leaves security teams with device secrets, weak revocation and poor per-user attribution.

A custom gateway gives teams full code control. Engineers can write tenant logic, request shaping, budget rules and audit exports in their own service. That choice also adds hosting, patching, incident response and release ownership.

The APIM pattern fits Azure-heavy enterprises that want policy enforcement with less code. Entra ID handles sign-in and Conditional Access. APIM handles token validation, header rewriting, quotas and traces. Foundry handles the model endpoint. The trade-off sits in APIM policy skill, gateway capacity planning and Azure operational ownership.

Pricing and operations

Budget for two cost centers: APIM capacity and Foundry model usage. Use the Azure pricing calculator before rollout because APIM tier choice depends on traffic shape, networking needs and policy volume.

Consumption can fit pilots when the policy set stays small and traffic stays uneven. Basic, Standard or Premium tiers fit steadier production use, especially when teams need virtual network support, higher throughput or stronger isolation.

Foundry costs follow model usage. APIM logs help finance and platform teams map spend back to Entra users, groups or business units. Add token metrics at the gateway once teams need chargeback, abuse detection or quota enforcement.

Migration plan

Start with a small Entra security group. Set Assignment required to Yes on the Enterprise Application so approved users can sign in. Export Claude Desktop configuration for macOS or Windows, then deploy it through Intune, Jamf or another device management tool.

Run two checks before expanding access. First, confirm APIM traces show validate-jwt success with the user's oid claim. Second, confirm the backend request to Foundry contains the Foundry credential and no user Authorization header.

Turn model discovery off if Claude Desktop reports that the provider model list has not loaded. Add the deployment name by hand, or stub /v1/models in APIM with an Anthropic-shaped response that lists approved deployments.

Business impact

The pattern gives enterprises a cleaner path to Claude Desktop adoption in regulated environments. Users sign in with their work identity. Security teams enforce MFA and Conditional Access through Entra ID. Platform teams inspect and govern traffic through one APIM gateway.

The biggest gain comes from attribution. Each request carries the user's Entra identity to APIM, so teams can build dashboards, alerts and quotas around real users instead of shared keys. That changes audit quality during incident response and cost review.

The managed identity option strengthens the design further. An administrator grants APIM access to Foundry, APIM requests a token for https://cognitiveservices.azure.com, and Foundry receives a service identity instead of a stored key.

For Azure-centered organizations, this pattern turns Claude Desktop from a local client with scattered secrets into a governed enterprise app. The work sits in app registration, APIM policy and device configuration, which gives platform teams a path they can operate and repeat.

Comments

Loading comments...