A unified Azure platform for creating and managing AI models, agents, and applications with built‑in enterprise security, monitoring, and governance
Hello , Welcome to MS Q&A
I checked the latest Microsoft Foundry documentation, and there is actually a more scalable option than creating one agent/API key per user or completely bypassing Foundry.
Microsoft Foundry Agent Service now supports OAuth Identity Passthrough (OBO) for MCP servers. This allows the agent to operate on behalf of the signed-in user, rather than using a single static API key for everyone. Microsoft explicitly states that with OAuth identity passthrough, user context persists and the MCP server can receive the user's delegated identity/permissions.
So the options are:
- API Key / Connection → static credential, no individual user context.
- Agent/Project Managed Identity → better security and secret management, but the downstream service sees the agent/project identity, not the individual user.
- OAuth Identity Passthrough (OBO) → recommended when we need per-user authorization and identity propagation. The user authenticates/consents, and Foundry uses that user's credentials when calling the MCP server.
For the cost-control scenario, we can still place an AI Gateway / Azure API Management layer in front of the MCP/API. Microsoft now has Foundry documentation specifically for governing MCP tools through an AI Gateway, including authentication, rate limiting, audit logging, and centralized observability.
Therefore, I would suggest the architecture as:
User → Foundry Agent → OAuth/OBO → AI Gateway/APIM → MCP/API
This avoids creating a separate agent or static key for every user and gives us a path to enforce per-user authorization, throttling and usage tracking at the gateway layer.
Microsoft documentation:
- MCP authentication: Microsoft Foundry – MCP server authentication
- Agent identity & OBO: Microsoft Foundry – Agent identity concepts
- AI Gateway governance: Microsoft Foundry – Govern MCP tools using an AI Gateway
Pls check and let me know if any further ques
Thanks
Deepanshu