Accessing Oauth enabled hosted MCP server #1564
Replies: 1 comment
|
There are two separate authentication hops here: your code authenticates to Foundry, and Foundry authenticates to the remote MCP server. If you are staying on the classic var mcp = new MCPToolResource(mcpServerLabel);
mcp.UpdateHeader("Authorization", $"Bearer {fnoAccessToken}");
ToolResources resources = mcp.ToToolResources();
ThreadRun run = agentClient.Runs.CreateRun(thread, agent, resources);The MCP tool definition still supplies the stable For new Foundry Agent Service development, Microsoft now recommends a project connection/toolbox instead of injecting a shared bearer token in every run. Store the remote MCP authentication in the project connection and reference its Which option FnO needs depends on its authentication contract: static/custom bearer token, Microsoft Entra audience with managed identity, or delegated user OAuth. Confirm that audience and scopes from the FnO MCP documentation first—a valid token for Foundry itself will normally be rejected by the downstream MCP server. |
Uh oh!
There was an error while loading. Please reload this page.
Pre-submission Checklist
Question Category
Your Question
Hey, I have been trying to access the oauth enabled FnO mcp server using package Azure.AI.Agents.Persistent, But struggling on how to pass the bearer token or how to configure the oauth. I can able to create as a tool in foundry, but not sure how to do using SDK.
Generally how to access oauth enabled hosted mcp server
Reference:
FnO MCP Server
All reactions