{"id":2751,"date":"2026-07-22T08:00:29","date_gmt":"2026-07-22T15:00:29","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/foundry\/?p=2751"},"modified":"2026-07-21T22:51:16","modified_gmt":"2026-07-22T05:51:16","slug":"building-agents-that-act-on-your-behalf-with-toolboxes-in-foundry","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/foundry\/building-agents-that-act-on-your-behalf-with-toolboxes-in-foundry\/","title":{"rendered":"Building Agents that Act on Your Behalf with Toolboxes in Foundry"},"content":{"rendered":"<p><b><span data-contrast=\"none\">How Toolboxes in Foundry simplify user delegation<\/span><\/b><\/p>\n<p><span data-contrast=\"none\">At some point, many agents move from answering questions to taking action. And when it does, the question becomes: <\/span><b><span data-contrast=\"none\">whose\u00a0identity is\u00a0it\u00a0acting\u00a0with<\/span><\/b><span data-contrast=\"none\">?\u00a0Imagine\u00a0you\u00a0are building an\u00a0internal\u00a0employee\u00a0agent.\u00a0\u00a0It needs\u00a0to call\u00a0a\u00a0private, Entra-protected\u00a0MCP server for orders, and it also needs to use Microsoft\u2019s managed Work IQ MCP server to reason over the employee\u2019s Microsoft 365 context. In both cases, the agent can\u2019t run as a\u00a0managed identity or service account. It has to act as the\u00a0<\/span><b><span data-contrast=\"none\">real signed-in user\u00a0<\/span><\/b><span data-contrast=\"none\">\u2014 with that user\u2019s permissions, access boundaries, and data protections. That\u2019s where identity gets hard: exchanging tokens on behalf of the user, keeping each user\u2019s tokens isolated, and handling consent and refreshing.<\/span><span data-contrast=\"none\">\u00a0<\/span><span data-ccp-props=\"{&quot;335559738&quot;:200,&quot;335559739&quot;:120}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"2\"><b><span data-contrast=\"auto\">Why is this hard to build yourself?<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:260,&quot;335559739&quot;:140,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Let\u2019s take the example of employee agent. Both tools demand the same thing: user delegation. If you choose to implement the entire user delegation yourself, you probably need to spend weeks before you can start building the business logic for your agents:<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:120,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<ol>\n<li aria-setsize=\"-1\" data-leveltext=\"%1.\" data-font=\"Aptos,Arial,\u7b49\u7ebf\" data-listid=\"3\" data-list-defn-props=\"{&quot;335551671&quot;:1,&quot;335552541&quot;:0,&quot;335559683&quot;:0,&quot;335559684&quot;:-1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0,46],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"none\">Complex, high-stake token isolation: <\/span><\/b><span data-contrast=\"none\">You must partition token caches correctly by user and tenant. A wrong cache key can silently leak one user\u2019s downstream API access to another user.<\/span><\/li>\n<li aria-setsize=\"-1\" data-leveltext=\"%1.\" data-font=\"Aptos,Arial,\u7b49\u7ebf\" data-listid=\"3\" data-list-defn-props=\"{&quot;335551671&quot;:1,&quot;335552541&quot;:0,&quot;335559683&quot;:0,&quot;335559684&quot;:-1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0,46],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"none\">Consent management overhead: <\/span><\/b><span data-contrast=\"none\">You need to detect consent failures, send users through consent, refresh expired tokens, and handle retries correctly for each API in each agent code you write.<\/span><\/li>\n<li aria-setsize=\"-1\" data-leveltext=\"%1.\" data-font=\"Aptos,Arial,\u7b49\u7ebf\" data-listid=\"3\" data-list-defn-props=\"{&quot;335551671&quot;:1,&quot;335552541&quot;:0,&quot;335559683&quot;:0,&quot;335559684&quot;:-1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0,46],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"none\">Duplicated implementation: <\/span><\/b><span data-contrast=\"none\">Every new tool adds another scope, token exchange, cache entry, consent path, retry path, and header path.\u00a0As you scale with hundreds of tools and thousands of agents, you end up rebuilding the\u00a0same fragile plumbing.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335557856&quot;:16119285,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<\/ol>\n<p><b><a href=\"https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/07\/Screenshot_21-7-2026_223753_.webp\"><img decoding=\"async\" class=\"alignnone wp-image-2773\" src=\"https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/07\/Screenshot_21-7-2026_223753_-300x114.webp\" alt=\"Screenshot 21 7 2026 223753 image\" width=\"642\" height=\"244\" srcset=\"https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/07\/Screenshot_21-7-2026_223753_-300x114.webp 300w, https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/07\/Screenshot_21-7-2026_223753_-1024x389.webp 1024w, https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/07\/Screenshot_21-7-2026_223753_-768x291.webp 768w, https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/07\/Screenshot_21-7-2026_223753_-1536x583.webp 1536w, https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/07\/Screenshot_21-7-2026_223753_.webp 1974w\" sizes=\"(max-width: 642px) 100vw, 642px\" \/><\/a><\/b><\/p>\n<h2 aria-level=\"2\"><b><span data-contrast=\"auto\">How\u00a0does Toolbox\u00a0solve\u00a0it?<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:260,&quot;335559739&quot;:140,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Same scenario, same user delegation \u2014 but the agent carries none of the plumbing above. The core idea:<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:120,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"11\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\"><strong>Auth lives on the toolbox, not in the agent: <\/strong>You pick an auth type once, when you connect a tool \u2014 the agent code stays auth-free.<\/span><span data-ccp-props=\"{&quot;335559739&quot;:120}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"11\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\"><strong>Foundry handles the whole flow: <\/strong>Whatever a tool needs \u2014 User delegation, agent identity, API keys, and more \u2014 Foundry acquires, exchanges, and refreshes the tokens server-side.<\/span><span data-ccp-props=\"{&quot;335559739&quot;:120}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"11\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"3\" data-aria-level=\"1\"><span class=\"TextRun SCXW223919756 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW223919756 BCX8\"><strong>The auth flow is never your burden: <\/strong>You can configure tools behind Toolbox and get an MCP endpoint. As your business logic evolves, you simply add or remove tools behind the versioned toolbox endpoint.<\/span><\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">Toolboxes in Foundry solve these for you:\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:120,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<table style=\"width: 100%;\" data-tablestyle=\"MsoNormalTable\" data-tablelook=\"0\" aria-rowcount=\"4\">\n<tbody>\n<tr aria-rowindex=\"1\">\n<td style=\"width: 26.0516%;\" data-celllook=\"69905\"><strong>Before Toolbox<\/strong><\/td>\n<td style=\"width: 72.9986%;\" data-celllook=\"69905\"><strong>After Toolbox<\/strong><\/td>\n<\/tr>\n<tr aria-rowindex=\"2\">\n<td style=\"width: 26.0516%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">Per-user token isolation<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<td style=\"width: 72.9986%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">Foundry isolates tokens\u00a0<\/span>per caller<span data-contrast=\"auto\">\u00a0automatically \u2014 there&#8217;s no cache key to get wrong<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<\/tr>\n<tr aria-rowindex=\"3\">\n<td style=\"width: 26.0516%;\" data-celllook=\"4369\">Consent management<\/td>\n<td style=\"width: 72.9986%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">Foundry acquires, refreshes, and handles consent for each user<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<\/tr>\n<tr aria-rowindex=\"4\">\n<td style=\"width: 26.0516%;\" data-celllook=\"4369\">Duplicated implementation<\/td>\n<td style=\"width: 72.9986%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">Build a toolbox with various tools and auth once and reuse across agent harness<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/07\/image.webp\"><img decoding=\"async\" class=\"alignnone wp-image-2752\" src=\"https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/07\/image-300x134.webp\" alt=\"image image\" width=\"1282\" height=\"573\" srcset=\"https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/07\/image-300x134.webp 300w, https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/07\/image-768x343.webp 768w, https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/07\/image.webp 936w\" sizes=\"(max-width: 1282px) 100vw, 1282px\" \/><\/a><\/p>\n<h3><b><span data-contrast=\"auto\">Step 1 \u2014 Put the auth<\/span><\/b><\/h3>\n<p><span data-contrast=\"auto\">Auth type is chosen when the\u00a0<\/span>connection<span data-contrast=\"auto\">\u00a0is created \u2014 in the portal, with\u00a0<\/span><span data-contrast=\"auto\">azd<\/span><span data-contrast=\"auto\">, or via REST.\u00a0<\/span><b><span data-contrast=\"auto\">Never in agent code.<\/span><\/b><span data-contrast=\"auto\"> For end-user delegation you set the connection to <\/span><b><span data-contrast=\"auto\">OAuth2<\/span><\/b><span data-contrast=\"auto\">:<\/span><span data-ccp-props=\"{&quot;335559739&quot;:120}\">\u00a0<\/span><\/p>\n<pre class=\"prettyprint language-ts\"><code class=\"language-ts\">azd ai connection create &lt;name-of-connection&gt; \\\u00a0\r\n\u00a0\u00a0\u00a0 --kind remote-tool --target &lt;tool-endpoint&gt; \\\u00a0\r\n\u00a0\u00a0\u00a0 --auth-type oauth2\u00a0\r\n\u00a0\u00a0 --authorization-url &lt;auth-url&gt; \\\u00a0\u00a0\r\n\u00a0\u00a0 --token-url &lt;token-url&gt; \\\u00a0\u00a0\r\n\u00a0\u00a0 --client-id &lt;oauth-client-id&gt; \\\u00a0\u00a0\r\n\u00a0\u00a0 --client-secret &lt;oauth-client-secret&gt; \\\u00a0\u00a0\r\n\u00a0\u00a0 --scopes \"&lt;scope1&gt; &lt;scope2&gt;\" <\/code><\/pre>\n<h3><b><span data-contrast=\"auto\">Step 2 \u2014 Build the toolbox once<\/span><\/b><\/h3>\n<pre class=\"prettyprint language-py\"><code class=\"language-py\">version = project.toolboxes.create_version(\u00a0\r\n\u00a0\u00a0\u00a0 name=\"employee-toolbox\",\u00a0\r\n\u00a0\u00a0\u00a0 description=\"Private orders MCP and Work IQ connected via user delegation auth\",\u00a0\r\n\u00a0\u00a0\u00a0 tools=[\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 MCPToolboxTool(\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 server_label=\"orders\",\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 server_url=\"https:\/\/orders-mcp.example.com\/mcp\",\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 require_approval=\"never\",\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 project_connection_id=\"orders-mcp\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ),\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 WorkIQPreviewToolboxTool(\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 name=\"work_iq\",\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 description=\"Reason over the caller's M365 mail, chats, meetings, docs.\",\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 project_connection_id=\"workiq-conn\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ),\u00a0\r\n\u00a0\u00a0\u00a0 ],\u00a0\r\n) <\/code><\/pre>\n<h3><b><span data-contrast=\"auto\">Step 3 \u2014 Consume from a hosted agent<\/span><\/b><\/h3>\n<p><span data-contrast=\"auto\">The agent references the toolbox by its MCP endpoint \u2014 one tool, no header providers, no brokers, no caller context to thread through:<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:120,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<pre class=\"prettyprint language-py\"><code class=\"language-py\">PROJECT_ENDPOINT = \"&lt;project-endpoint&gt;\"\u00a0\r\nCONSUMER_URL = f\"{PROJECT_ENDPOINT}\/toolboxes\/employee-toolbox\/mcp?api-version=v1\"\u00a0\r\ntoolbox = MCPStreamableHTTPTool(\u00a0\r\n\u00a0\u00a0\u00a0 name=\"employee_toolbox\",\u00a0\r\n\u00a0\u00a0\u00a0 url=CONSUMER_URL,\u00a0\r\n)\u00a0\r\nagent = Agent(\u00a0\r\n\u00a0\u00a0\u00a0 client=FoundryChatClient(project_endpoint=PROJECT_ENDPOINT, credential=credential),\u00a0\r\n\u00a0\u00a0\u00a0 tools=[toolbox],\u00a0\r\n) <\/code><\/pre>\n<p><span data-contrast=\"auto\">One user request flows in, and Foundry hits <\/span><b><span data-contrast=\"auto\">both<\/span><\/b><span data-contrast=\"auto\">\u00a0the private MCP and Work IQ, each\u00a0<\/span><b><span data-contrast=\"auto\">on\u00a0end user&#8217;s behalf<\/span><\/b><span data-contrast=\"auto\">, and composes the response. Adding a third tool later is a new connection + one line in the toolbox version \u2014 the agent code never changes.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:120,&quot;335559739&quot;:120,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"2\"><b><span data-contrast=\"auto\">Beyond user delegation \u2014 what else you get<\/span><\/b><span data-ccp-props=\"{&quot;335559738&quot;:120,&quot;335559739&quot;:120,&quot;335572079&quot;:6,&quot;335572080&quot;:1,&quot;335572081&quot;:13421772,&quot;469789806&quot;:&quot;single&quot;}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Once your tools live in a toolbox, end-user delegation is just the first payoff. Toolbox provides comprehensive auth support beyond end user delegation, protect and govern your tools with guardrail and gateways.<\/span><span data-ccp-props=\"{&quot;335559739&quot;:120}\">\u00a0<\/span><\/p>\n<h3><b>Comprehensive set of auth support<\/b><\/h3>\n<table style=\"width: 100%; height: 278px;\" data-tablestyle=\"MsoNormalTable\" data-tablelook=\"0\" aria-rowcount=\"7\">\n<tbody>\n<tr aria-rowindex=\"1\">\n<td style=\"width: 19.81%;\" data-celllook=\"69905\"><strong>Auth Type\u00a0<\/strong><\/td>\n<td style=\"width: 31.886%;\" data-celllook=\"69905\"><b><span data-contrast=\"auto\">Whose identity reaches the tool<\/span><\/b><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<td style=\"width: 47.2185%;\" data-celllook=\"69905\"><b><span data-contrast=\"auto\">Use it for<\/span><\/b><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<\/tr>\n<tr aria-rowindex=\"2\">\n<td style=\"width: 19.81%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">agentic-identity<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<td style=\"width: 31.886%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">the agent&#8217;s own identity<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<td style=\"width: 47.2185%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">service-to-service with per-agent audit<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<\/tr>\n<tr aria-rowindex=\"3\">\n<td style=\"width: 19.81%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">project-managed-identity<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<td style=\"width: 31.886%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">the project&#8217;s managed identity<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<td style=\"width: 47.2185%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">service-to-service, no user context<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<\/tr>\n<tr aria-rowindex=\"4\">\n<td style=\"width: 19.81%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">oauth2<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<td style=\"width: 31.886%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">the end user (user delegation, consent-once)<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559685&quot;:0,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/td>\n<td style=\"width: 47.2185%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">Tools that require end user context such as\u00a0WorkIQ, GitHub and more<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<\/tr>\n<tr aria-rowindex=\"5\">\n<td style=\"width: 19.81%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">custom-keys<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<td style=\"width: 31.886%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">a stored API key\/header<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<td style=\"width: 47.2185%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">key-based SaaS; the agent never sees the secret<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<\/tr>\n<tr aria-rowindex=\"6\">\n<td style=\"width: 19.81%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">none<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<td style=\"width: 31.886%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">anonymous<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<td style=\"width: 47.2185%;\" data-celllook=\"4369\"><span data-contrast=\"auto\">public servers (e.g. Microsoft Learn MCP)<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 aria-level=\"3\"><span data-contrast=\"auto\">Governed by default<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">Because Foundry manages every tool call, it can enforce policy at the boundary \u2014 not per-agent code:<\/span><span data-ccp-props=\"{&quot;335559739&quot;:120}\">\u00a0<\/span><\/p>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\u2022\" data-font=\"Aptos,Arial,\u7b49\u7ebf\" data-listid=\"6\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\u2022&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/foundry\/agents\/how-to\/tools\/toolbox?pivots=python#configure-guardrails\"><b><span data-contrast=\"none\">RAI guardrails<\/span><\/b><\/a><span data-contrast=\"auto\">\u00a0screen\u00a0every tool&#8217;s input and output, so an untrusted MCP response can&#8217;t smuggle prompt-injection or unsafe content back into the agent.<\/span><span data-ccp-props=\"{&quot;335559739&quot;:60}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\u2022\" data-font=\"Aptos,Arial,\u7b49\u7ebf\" data-listid=\"6\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\u2022&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/foundry\/agents\/how-to\/tools\/governance\"><b><span data-contrast=\"none\">Bring-your-own gateway<\/span><\/b><\/a><span data-contrast=\"none\">\u00a0<\/span><span data-contrast=\"auto\">\u2014 front your MCP servers with\u00a0a gateway, for example APIM,\u00a0for rate limiting, logging, and network policy.<\/span><span data-ccp-props=\"{&quot;335559739&quot;:60}\">\u00a0<\/span><\/li>\n<\/ul>\n<h2><b><span data-contrast=\"auto\">Try it yourself<\/span><\/b><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Get started fast today with our Microsoft Foundry <a href=\"https:\/\/github.com\/microsoft-foundry\/foundry-samples\/tree\/main\/samples\/python\/hosted-agents\/bring-your-own\/responses\/langgraph-toolbox-user-identity\">samples<\/a> \u2014 it walks through setup, various auth types, and consuming the toolbox from Microsoft Agent Framework, and LangGraph in one place<\/span><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Further reading<\/span><\/b><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/p>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><a href=\"https:\/\/learn.microsoft.com\/azure\/foundry\/agents\/how-to\/tools\/toolbox\"><span data-contrast=\"none\">Toolbox docs<\/span><\/a><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"3\" data-aria-level=\"1\"><a href=\"https:\/\/learn.microsoft.com\/azure\/foundry\/agents\/how-to\/tools\/model-context-protocol\"><span data-contrast=\"none\">Model Context Protocol tools<\/span><\/a><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"4\" data-aria-level=\"1\"><a href=\"https:\/\/learn.microsoft.com\/azure\/foundry\/agents\/how-to\/tools\/work-iq\"><span data-contrast=\"none\">Work IQ<\/span><\/a><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559683&quot;:0,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"5\" data-aria-level=\"1\"><a href=\"https:\/\/learn.microsoft.com\/entra\/identity-platform\/v2-oauth2-on-behalf-of-flow\"><span data-contrast=\"none\">Entra On-Behalf-Of flow<\/span><\/a><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>How Toolboxes in Foundry simplify user delegation At some point, many agents move from answering questions to taking action. And when it does, the question becomes: whose\u00a0identity is\u00a0it\u00a0acting\u00a0with?\u00a0Imagine\u00a0you\u00a0are building an\u00a0internal\u00a0employee\u00a0agent.\u00a0\u00a0It needs\u00a0to call\u00a0a\u00a0private, Entra-protected\u00a0MCP server for orders, and it also needs to use Microsoft\u2019s managed Work IQ MCP server to reason over the employee\u2019s Microsoft 365 [&hellip;]<\/p>\n","protected":false},"author":166509,"featured_media":1563,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[112,51,175,27],"tags":[],"class_list":["post-2751","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-foundry-agent-service","category-mcp","category-toolbox","category-whats-new"],"acf":[],"blog_post_summary":"<p>How Toolboxes in Foundry simplify user delegation At some point, many agents move from answering questions to taking action. And when it does, the question becomes: whose\u00a0identity is\u00a0it\u00a0acting\u00a0with?\u00a0Imagine\u00a0you\u00a0are building an\u00a0internal\u00a0employee\u00a0agent.\u00a0\u00a0It needs\u00a0to call\u00a0a\u00a0private, Entra-protected\u00a0MCP server for orders, and it also needs to use Microsoft\u2019s managed Work IQ MCP server to reason over the employee\u2019s Microsoft 365 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/posts\/2751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/users\/166509"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/comments?post=2751"}],"version-history":[{"count":1,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/posts\/2751\/revisions"}],"predecessor-version":[{"id":2781,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/posts\/2751\/revisions\/2781"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/media\/1563"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/media?parent=2751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/categories?post=2751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/tags?post=2751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}