Context:
We've built an MCP (Model Context Protocol) server hosted on an Azure Function App that provides SQL database tools (ListTables, DescribeTable, ReadData, etc.). Currently works great with VS Code MCP client. Now we want to connect this MCP directly to a Copilot agent and publish it to MS Teams, to eliminate the overhead of separate webapp hosting, app-level authentication.
Our Current Setup:
MCP Server: Azure Function App (C#, .NET 8)
MCP Endpoint: https://{function-app}.azurewebsites.net/runtime/webhooks/mcp/sse
Tools Exposed: SQL database query tools (read-only)
Current Auth: Easy Auth (Entra ID) with OAuth for MCP clients (Work in progress)
host.json config: "DefaultAuthorizationLevel": "anonymous" (platform handles OAuth)
Questions for the Community:
1️⃣ Authentication Mechanism for Agent ↔ MCP Connection
What auth mechanism does Copilot agent use when connecting to an external MCP server?
Is it OAuth/bearer token? Managed Identity? Something else?
Do we need to preauthorize a specific Copilot agent client ID (like we did for VS Code)?
If using OAuth, what scopes does the agent request?
2️⃣ Network Connectivity
What are the networking requirements between Copilot agent and a Function App-hosted MCP?
Does the Function App need to be publicly accessible, or can it work with VNet integration/Private Endpoints?
Are there specific IP ranges or service tags to allowlist for Copilot agent traffic?
3️⃣ Identity Flow
When the agent calls MCP tools, does the user's identity flow through (like VS Code MCP)?
Or does it use a service principal/managed identity for the agent itself?
This matters for our RBAC - we enforce role-based access based on user's security group membership.
The goal is for users to ask Copilot questions like "What's the Windows laptop market share?" and have the agent call our MCP tools to query the database and return results. Has anyone successfully integrated an Azure Function App-hosted MCP with a Copilot agent? Would love to hear about:
- Configuration steps
- Auth setup that worked
- Any gotchas when hosting MCP on Azure Function App specifically?
- Any documentation references
Thanks in advance!