Skip to main content

Microsoft Agent 365

Microsoft hosts one MCP server per workload at https://agent365.svc.cloud.microsoft/agents/tenants/{tenantId}/servers/{server} over HTTP. The Microsoft Agent 365 card with the Official badge asks for the Entra tenant id and one server. Add the card again to connect a second server.

Microsoft does not support dynamic client registration for these servers. An admin registers an app in Microsoft Entra ID and pastes its client ID and secret into Willow. Each person then signs in with their own work or school account. Calls use that account. See Set up MCP server authentication.

These servers are available only to tenants in the Frontier program. Microsoft documents the workload servers on this card (Copilot, Calendar, Mail, SharePoint, OneDrive, Teams, User, and Word) as a preview kept for backward compatibility. For new Microsoft 365 access, Microsoft's current guidance is Work IQ MCP. See Understand MCP server options in Agent 365.

Before you start​

  • A Global Administrator, to enroll the tenant in Frontier and grant admin consent. An Application Administrator can run the service principal script
  • An account that can register apps in the tenant. Microsoft's app registration quickstart requires at least the Application Developer role
  • The Entra tenant id (a GUID), the Directory (tenant) ID on the app registration Overview

Enroll the tenant in Frontier​

Microsoft's enrollment steps require at least one Microsoft E7 license, and the Frontier FAQ also lists a Microsoft 365 Copilot license. Only a Global Administrator can enroll the tenant.

  1. In the Microsoft 365 admin center, go to Agents → Overview.
  2. In the banner, select Try now, then I agree to the Terms of Service.
  3. Go to Billing → Licenses and confirm Microsoft 365 Frontier for AI Teammates shows 25 active licenses.

The same agreement is on Home → Dashboard View, on the Agent 365 card. See Preview Agent 365 features through the Frontier program.

Create the Agent 365 Tools service principal​

Once per tenant, an admin creates the Agent 365 Tools service principal. Microsoft's tooling guide treats that script as the setup that makes the tenant ready for MCP server configuration. The script requires PowerShell 7. With no arguments it creates the shared Agent 365 Tools principal (ea9ffc3e-8a23-4a7d-836d-234d7c7565c1) and the per-server principals. Running it again skips principals that already exist.

  1. Download New-Agent365ToolsServicePrincipalProdPublic.ps1, linked from Add and manage tools.
  2. Open PowerShell 7 as Administrator, go to the script directory, and run .\New-Agent365ToolsServicePrincipalProdPublic.ps1.
  3. Sign in to Microsoft Graph when prompted. The script requests Application.ReadWrite.All. A Global Administrator or Application Administrator can approve that.

Register an Entra app​

  1. In Willow, go to MCP Servers → + Add MCP server, open the Microsoft Agent 365 card with the Official badge, and click + Use.
  2. On the Setup tab, select Client ID & secret and copy the Redirect URL:
    • SaaS: https://{org}.withwillow.ai/{org}/api/auth/callback
    • On-prem: {CONNECT_URL}/{org}/api/auth/callback
  3. In the Microsoft Entra admin center, go to Entra ID → App registrations → New registration.
  4. Enter a name. Under Supported account types, select Single tenant only. Select Register. See Register an app in Microsoft Entra ID.
  5. On Authentication, select Add Redirect URI, choose Web, and paste the URL from Willow. See Add a redirect URI.
  6. On Certificates & secrets → Client secrets → New client secret, add a description and an expiration, then select Add. Copy the secret Value. Microsoft shows it once. Secret lifetime is at most 24 months. See Add a client secret.
  7. On Overview, copy the Application (client) ID and the Directory (tenant) ID.
  8. On API permissions, add a permission and search for Agent 365 Tools. If that name is missing, search for ea9ffc3e-8a23-4a7d-836d-234d7c7565c1. Add the delegated permission for the server you selected, from the table below, then Grant admin consent for the tenant.
Server on the cardPermission
Microsoft 365 Copilot SearchMcpServers.CopilotMCP.All
Outlook MailMcpServers.Mail.All
Outlook CalendarMcpServers.Calendar.All
Microsoft TeamsMcpServers.Teams.All
User profileMcpServers.Me.All
OneDrive and SharePointMcpServers.OneDriveSharepoint.All
SharePoint ListsMcpServers.SharepointLists.All
Microsoft WordMcpServers.Word.All
Microsoft 365 admin centerMcpServers.M365Admin.All

Set up Willow​

  1. Set Entra tenant id to the Directory (tenant) ID. Replace YOUR_TENANT_ID. Select the Agent 365 server that matches the permission you granted.
  2. Keep OAuth sign-in. Select Client ID & secret. Paste the Client ID and Client secret.
  3. Open Advanced settings. Set:
    • Authorization Endpoint: https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/authorize
    • Token Endpoint: https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token
    • Scopes: ea9ffc3e-8a23-4a7d-836d-234d7c7565c1/{permission} and offline_access, as two scopes. {permission} is the value from the table, such as McpServers.Mail.All. With your own client, Willow requests only the scopes listed here.
  4. Click Check connection and sign in. Assign groups and Publish.

Admins govern these servers in the Microsoft 365 admin center under Agents → Tools. A server that is blocked there stays unavailable. See Understand MCP server options in Agent 365.

Troubleshooting​

Willow couldn't register itself with Microsoft. These servers have no dynamic client registration. Create the Entra app above and paste the client ID and secret.

The redirect URL is rejected. On Authentication, the platform is Web, and the URI matches the Setup tab exactly.

Agent 365 Tools does not appear under API permissions. Run the service principal script in Create the Agent 365 Tools service principal, then search for ea9ffc3e-8a23-4a7d-836d-234d7c7565c1.

Sign-in is refused, or the token has no access to the server. The tenant is outside Frontier, admin consent is missing, or Scopes names a different server than the one selected on the card. Enroll the tenant, grant consent, and request ea9ffc3e-8a23-4a7d-836d-234d7c7565c1/{permission} plus offline_access for that server.

Additional Resources​