Per-user identity (OAuth passthrough / OBO) to an MCP tool from a Foundry agent published to Teams — any supported path today?

Miguel de Frutos 0 Reputation points
2026-06-08T17:35:00.64+00:00

I have a Foundry agent (clean version, single MCP tool, require_approval: never) whose MCP server is hosted on Azure Container Apps and uses OAuth Identity Passthrough with my own Entra app (custom scope access_as_user, tenant-specific login URLs, redirect URIs registered, OBO to Microsoft Graph in the server code).

When I test the agent published to Teams, the consent flow completes end to end ("Resuming after OAuth consent"), but the MCP tool is never invoked: neither tools/list nor tools/call ever reaches my server (verified with request logging on a single replica), and the agent replies it has no access to the tool. The server is healthy and reachable directly.

I understand from the docs and other Q&A threads that OAuth identity passthrough to MCP is only honored via the Responses protocol, and that an agent published to Teams/M365 Copilot uses the Activity protocol via Bot Service channels, which does not forward the per-user OAuth token to MCP tools.

My questions:

  1. Is that correct and current — i.e., today there is no way for a Foundry agent published to Teams to pass the signed-in user's identity (OBO) to an MCP tool?
  2. Is there any supported pattern to achieve per-user identity to backend tools from Teams today (for example a custom engine agent with Teams SSO that calls the tool server with the user token), and is there guidance for it?
  3. Is per-user OAuth passthrough from the Teams/M365 channel to MCP tools on the roadmap, and if so, any timeline?

Thanks — I want to confirm the architecture before committing to a custom Teams bot as the workaround.

Foundry Agent Service
Foundry Agent Service

A fully managed platform in Microsoft Foundry for hosting, scaling, and securing AI agents built with any supported framework or model


2 answers

Sort by: Most helpful
  1. SRILAKSHMI C 19,715 Reputation points Microsoft External Staff Moderator
    2026-06-09T10:35:54.8+00:00

    Hello @Miguel de Frutos

    Thank you for reaching out to Microsoft Q&A.

    Based on the currently available Azure AI Foundry documentation, your understanding appears to be largely aligned with the supported OAuth identity passthrough model for MCP tools.

    1. Is per-user OAuth passthrough to an MCP tool supported for a Foundry agent published to Teams?

    Azure AI Foundry supports OAuth Identity Passthrough for MCP tools, where Agent Service:

    • Prompts the user for consent
    • Completes the OAuth sign-in flow
    • Securely stores user-scoped tokens
    • Uses those tokens when invoking MCP server tools on behalf of the user

    However, the available documentation describes this capability specifically within the context of Azure AI Foundry Agent Service invoking MCP tools.

    Based on the documentation currently available, there is no explicit confirmation that a Foundry agent published through Microsoft Teams or Microsoft 365 Copilot can forward the signed-in user's delegated identity/token through the Activity Protocol and Bot Service channels to arbitrary MCP tools in the same manner.

    As a result, we cannot currently confirm a supported architecture where a Teams-published Foundry agent passes the user's OAuth token (OBO) directly to an MCP tool.

    2. What is the supported pattern today for per-user identity?

    The documented and supported approach today is the Azure AI Foundry OAuth Identity Passthrough mechanism for MCP servers and similarly for supported Agent-to-Agent scenarios, where Agent Service manages:

    • User consent
    • Token acquisition
    • Token storage
    • Token refresh
    • User-context invocation of downstream MCP tools

    The documentation also notes several requirements, including:

    • User and Foundry project must belong to the same tenant
    • Cross-tenant token exchange is not supported
    • offline_access should be included to support token refresh

    While this provides a supported per-user identity model within Foundry, the documentation does not currently describe an equivalent Teams-specific flow that forwards Teams user tokens to MCP tools.

    If your scenario requires guaranteed per-user identity propagation from Teams to backend services, a custom architecture such as:

    • Custom Teams application with Teams SSO
    • Custom bot implementation
    • Backend OBO flow managed directly by your application

    may be necessary, depending on your requirements.

    3. Why might the MCP server not be receiving tool calls?

    Given your observation that:

    • OAuth consent completes successfully
    • The agent reports "Resuming after OAuth consent"
    • No tools/list or tools/call requests ever reach the MCP server
    • The agent subsequently reports that it cannot access the tool

    this behavior is consistent with a scenario where the Teams/M365 channel is not participating in the MCP OAuth passthrough mechanism expected by the Agent Service flow.

    However, the current documentation does not explicitly document this behavior,

    4. Is this capability on the roadmap?

    At this time, the publicly available documentation does not provide any roadmap information or timeline regarding:

    • Per-user OAuth passthrough from Teams/M365 channels to MCP tools
    • Delegated token forwarding from Teams-published Foundry agents to MCP servers

    Therefore, we are unable to provide an official statement or timeline regarding future support.

    Please refer this

    Set up authentication for Model Context Protocol (MCP) tools – OAuth identity passthrough: https://learn.microsoft.com/azure/foundry/agents/how-to/mcp-authentication#oauth-identity-passthrough

    Agent2Agent (A2A) authentication – OAuth identity passthrough: https://learn.microsoft.com/azure/foundry/agents/concepts/agent-to-agent-authentication?wt.mc_id=knowledgesearch_inproduct_azure-cxp-community-insider#oauth-identity-passthrough

    Agent identity concepts in Microsoft Foundry – Tool authentication & agent identity: https://learn.microsoft.com/azure/foundry/agents/concepts/agent-identity#tool-authentication

    Microsoft MCP Server for Enterprise overview: https://learn.microsoft.com/graph/mcp-server/overview

    I Hope this helps. Do let me know if you have any further queries.


    If this answers your query, please do click Accept Answer and Yes for was this answer helpful.

    Thank you!

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-06-08T17:35:25.95+00:00

    The available documentation only describes OAuth identity passthrough for MCP tools when used via Foundry Agent Service and the Responses protocol. It does not describe or document any support for forwarding per-user OAuth tokens from Teams/M365 Copilot channels (Activity protocol via Bot Service) to MCP servers.

    From the documented behavior:

    • OAuth identity passthrough is explicitly scoped to MCP tools configured in Foundry projects, where Agent Service generates a consent link, stores user credentials, and then uses those credentials when invoking MCP tools.
    • The flow and validation steps are described entirely in the context of Agent Service calling MCP servers directly, not via Teams/Bot Service.
    • There is no documented mechanism for cross-tenant token exchange or for passing Microsoft Entra tokens scoped to a known Microsoft audience to untrusted/custom MCP endpoints.

    The context does not provide:

    • Any statement that Teams or M365 Copilot channels can currently forward the signed-in user’s token to MCP tools.
    • Any supported pattern or guidance for implementing per-user identity (OBO) from Teams to MCP tools (for example, via a custom engine agent or Teams SSO pattern).
    • Any roadmap or timeline for enabling per-user OAuth passthrough from Teams/M365 channels to MCP tools.

    Given the available documentation, only the Agent Service → MCP server path with OAuth identity passthrough is described and supported. No additional or alternative patterns involving Teams/M365 channels are documented.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.