---
title: "Building User-Delegated AI Tools with Microsoft Foundry Toolboxes"
url: https://daily.dev/posts/building-user-delegated-ai-tools-with-microsoft-foundry-toolboxes-wymmguzvt
source_url: https://www.csharp.com/article/building-user-delegated-ai-tools-with-microsoft-foundry-toolboxes
type: article
source: "C# Corner"
published: 2026-08-19T08:50:42.637Z
updated: 2026-08-19T08:51:08.397Z
tags: ["ai-agents", "authentication", "mcp"]
reading_time: 11
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Building User-Delegated AI Tools with Microsoft Foundry Toolboxes

**[C\# Corner](https://daily.dev/sources/csharpcorner)** · 11 min read · 0 upvotes · 0 comments

## Summary

Microsoft Foundry Toolboxes centralize authentication for AI agent tool calls, letting agents delegate to a user's identity via OAuth 2.0 rather than each agent implementing token acquisition, isolation, consent, and refresh independently. The piece walks through configuring connections, building reusable toolboxes, and consuming them from agents, along with supported authentication models (agentic-identity, project-managed-identity, oauth2, custom-keys, none). It covers security concerns like token isolation between users/tenants, narrow OAuth scopes, approval boundaries for consequential actions, gateway protection, and toolbox versioning, plus common mistakes and a production security checklist for user-delegated AI tools.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.csharp.com/article/building-user-delegated-ai-tools-with-microsoft-foundry-toolboxes>

## Questions this post answers

### What is the difference between agent identity and user delegation in an AI agent tool call?

Agent identity means the downstream tool sees the application or agent's own credentials, useful for service-to-service operations where the app should have its own permissions. User delegation means the tool acts using the signed-in user's authorization context, so access follows that user's existing permissions rather than the agent's. The same agent can use either identity depending on the caller.

_Developers weighing identity models for agent tool access can dig deeper into these patterns on daily.dev._

### What authentication types does Microsoft Foundry support for toolbox connections?

Foundry toolbox connections support five authentication types: agentic-identity (agent's own identity, for service-to-service operations), project-managed-identity (application-owned access), oauth2 (end-user delegated access), custom-keys (stored API key or header, for key-based services), and none (anonymous, for public tools). Choosing the right one should match the security boundary needed rather than defaulting to delegated access.

_Teams designing secure tool integrations can track authentication patterns like these on daily.dev._

### Why is token cache partitioning a security risk in multi-user AI agent systems?

Incorrect token-cache partitioning can cause one user's downstream access token to be exposed to another user if the cache key does not properly isolate callers. Microsoft identifies this as a serious risk requiring caller context to be part of the isolation boundary, since a bad implementation could let User B's request resolve User A's cached token.

_Anyone hardening multi-tenant AI agent auth can keep up with security patterns like this via daily.dev._

## Similar posts on daily.dev

- [Building Agents that Act on Your Behalf with Toolboxes in Foundry](https://daily.dev/posts/building-agents-that-act-on-your-behalf-with-toolboxes-in-foundry-zalwkhdfv) · DevBlogs · 0 upvotes · 0 comments
- [Microsoft Foundry Tackles the AI Agent Tool Problem Nobody Talks About](https://daily.dev/posts/microsoft-foundry-tackles-the-ai-agent-tool-problem-nobody-talks-about-msoxw2ziz) · DevOps.com · 0 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#authentication](https://daily.dev/tags/authentication), [#mcp](https://daily.dev/tags/mcp)

[View this post on daily.dev](https://daily.dev/posts/building-user-delegated-ai-tools-with-microsoft-foundry-toolboxes-wymmguzvt)
