
Why Build Agents This Way?
Microsoft 365 Copilot Studio is an excellent no-code and low-code tool for building agents quickly. But for organisations that need fine-grained control over agent behaviour, custom reasoning logic, proprietary data integrations, or enterprise-grade observability, the pro-code path through Azure Foundry and the Claude API gives you something Copilot Studio alone cannot: complete architectural control.
Since early 2026, Anthropic's Claude models have been available natively in Microsoft Foundry — the enterprise AI platform on Azure. That integration means you can build Claude-powered agents that run on Azure infrastructure, within your Microsoft 365 tenant's security boundary, with full access to Microsoft's governance, compliance, and observability tooling. This guide walks through how that architecture fits together.
Step 1: Set Up Claude in Azure Foundry
The starting point is provisioning Claude in your Azure Foundry environment. Claude Sonnet and Claude Haiku models are available for most use cases, with Claude Opus available for the highest-complexity tasks requiring the largest context window and deepest reasoning.
Access is managed through your Azure subscription. Once provisioned, you authenticate to Claude in Foundry using either an Anthropic API key or Azure credentials for environments using Azure CLI authentication. Your deployment name becomes the model identifier you reference in all agent calls. This setup gives you a managed endpoint that operates within your Azure security perimeter rather than routing through Anthropic's public API — important for organisations with data residency requirements.
Step 2: Define Your Agent's Tools with MCP
The Model Context Protocol (MCP) is the open standard that allows Claude to connect to external systems, data sources, and APIs. In a Microsoft 365 context, MCP is what gives your agent the ability to read SharePoint documents, pull data from Dynamics 365, send emails through Outlook, or query any internal system that you expose via an MCP server.
Think of MCP tools as the agent's hands. The agent reasons with Claude's intelligence, but MCP is what lets it reach into your business systems and act. You can use pre-built MCP connectors for common Microsoft services, or build custom MCP servers to expose proprietary internal systems. Each MCP server defines the tools available to the agent, including the parameters each tool accepts and the data it returns.
For Microsoft 365 specifically, key MCP integrations to consider include SharePoint for document retrieval and creation, Microsoft Graph for calendar and email access, Teams for notifications and channel posting, and Dataverse for structured business data from Dynamics 365 and Power Apps.
Step 3: Build the Agent Logic
With your model endpoint and MCP tools configured, you build the agent logic using either the Microsoft Agent Framework (available in Python and C#) or directly through the Anthropic SDK. The Microsoft Agent Framework provides the cleanest integration with Azure infrastructure and includes built-in support for Anthropic agents, tool orchestration, and session management.
A basic agent definition specifies: the model to use (your Claude Foundry deployment), the agent's instructions (the system prompt that governs its behaviour and persona), the tools it has access to (your MCP servers and any additional tools like web search or code execution), and any constraints on token usage and response format.
Claude's extended thinking capability can be enabled at the agent level for tasks requiring multi-step reasoning — this allows the agent to reason through complex decisions before producing its final output, which is particularly valuable for analytical workflows where the quality of reasoning matters as much as the final answer.
Step 4: Ground the Agent in Your M365 Data
The most powerful Microsoft 365 agents combine Claude's reasoning with grounding in your organisation's actual data. This is where Work IQ comes in for agents built through Copilot Studio, but for pro-code agents, you achieve similar grounding through Microsoft Graph API calls and SharePoint search integration in your MCP layer.
Effective grounding means the agent retrieves relevant context before reasoning — pulling the right documents, emails, or data records based on the task, and passing that context to Claude along with the user's instruction. This retrieval-augmented architecture prevents hallucination and ensures the agent's responses reflect your organisation's actual state rather than generalised knowledge.
Step 5: Deploy and Govern with Agent 365
Once your agent is built and tested, deployment within a Microsoft 365 environment means connecting it to the surfaces where users will interact with it — Teams, SharePoint, Outlook, or a custom interface — and registering it with Agent 365, Microsoft's agent governance control plane, available from May 1, 2026.
Agent 365 provides the visibility layer that enterprise IT and security teams require: who is using the agent, what actions it is taking, what data it is accessing, and where it might pose risk. Without this observability, scaling agent adoption across an organisation is difficult to justify to security and compliance stakeholders.
The Result: A Governed, Claude-Powered Enterprise Agent
The architecture described here — Claude in Azure Foundry, connected via MCP to Microsoft 365 services, governed by Agent 365 — gives you an enterprise AI agent that is meaningfully more capable and more controllable than anything achievable through generic AI tools.
At Trim Journey, we build exactly this kind of architecture for organisations that are ready to move beyond experimentation into production agent deployment. Book a technical scoping call to discuss your first production agent build.


