writing/blog/2026/05
BlogMay 25, 2026·6 min read

Build Enterprise AI Agents with n8n + Microsoft Agent 365

Learn to deploy n8n AI agents that appear as real Microsoft identities in Teams, Outlook, and SharePoint using the new Agent 365 Trigger node.

Until now, AI agents integrated into enterprise environments were second-class citizens. They lived behind webhooks, lurked as bots with synthetic identifiers, and had no real presence in the productivity tools your team actually uses. Microsoft Agent 365 and n8n's new trigger node just changed that — permanently.

As of May 2026, you can deploy an n8n AI agent that receives a real Microsoft identity: a Teams @mention address, an Outlook inbox, SharePoint permissions, and full conditional access governance through Entra ID. This is not a chatbot. This is an autonomous colleague with an enterprise badge.

What Is Microsoft Agent 365?

Microsoft Agent 365 (generally available since May 1, 2026) is not Copilot. It is a control plane for managing AI agents across your Microsoft 365 tenant — purpose-built to observe, govern, and secure every agent running inside your organization.

It ships as a standalone product at $15 per user per month, or included in the new Microsoft 365 E7 bundle at $99/user/month alongside M365 E5, Microsoft 365 Copilot, and the Entra Suite. The E7 tier is Microsoft's first new enterprise license since E5 launched in 2015 — a signal of how seriously the company is treating agent infrastructure.

At its core, Agent 365 does three things:

  • Observe: Discover every agent running in your tenant, including shadow agents deployed without IT approval.
  • Govern: Apply conditional access policies, audit logs, and lifecycle controls (start, stop, delete) to agents across AWS Bedrock and Google Cloud in addition to Azure.
  • Secure: Integrate with Microsoft Defender for behavioral threat detection and Purview for data protection.

For developers, Agent 365 exposes an SDK and CLI that add enterprise capabilities — Entra-based agent identity, governed tool access, OpenTelemetry observability, and the Activity protocol for notifications — to any agent you already built, regardless of stack.

The n8n Agent 365 Trigger Node

On May 5, 2026, n8n shipped a dedicated Microsoft Agent 365 Trigger node that replaces the previous manual setup using Webhook Trigger plus AI Agent nodes. The result: you can provision an n8n workflow as an Agent 365 application with minimal configuration overhead.

What this means practically:

  • Your n8n agent gets @mentioned in Teams like a real team member.
  • It receives emails directly in Outlook with a company-provisioned address.
  • It can be tagged in Word and SharePoint documents with the same permission model as any employee.
  • It connects to more than 1,200 enterprise integrations through n8n's native node library: Zendesk, Salesforce, PagerDuty, Datadog, Jira, and hundreds more.

The trigger node supports three sub-node types: a Model (your language model of choice), Memory (for persistent conversation context), and Tools (native n8n nodes, MCP server connections, or sub-workflows).

Setting Up: Step by Step

Microsoft Side

Step 1 — Register the application in Entra ID. Create an app registration in your Azure portal. This gives the agent a client ID and a service principal — the foundation of its Microsoft identity.

Step 2 — Create an agent blueprint with the Agent 365 CLI.

# Install the Agent 365 CLI
npm install -g @microsoft/agent365-cli
 
# Initialize a new agent blueprint
agent365 init --name "ops-assistant" --type n8n
 
# Deploy the blueprint to your tenant
agent365 deploy --tenant your-tenant-id

The CLI provisions the agent in your tenant's Agent 365 registry, creating the Teams identity and Outlook mailbox.

Step 3 — Get admin approval. An M365 global admin must approve the agent within your tenant before it can receive messages. Approval can be granted through the Agent 365 admin portal or via PowerShell.

n8n Side

Step 4 — Add the Microsoft Agent 365 Trigger node. In your n8n workflow editor, search for "Microsoft Agent 365 Trigger" and add it as the workflow's entry point. Connect your Entra app credentials (client ID, client secret, tenant ID) in the node settings.

Step 5 — Connect a language model. Attach a Model sub-node — OpenAI, Azure OpenAI, Claude via Anthropic API, or any OpenAI-compatible endpoint. This is the brain of your agent.

Step 6 — Add tools. This is where n8n's ecosystem shines. You can add:

  • Native n8n nodes (Jira, Slack, GitHub, Salesforce, etc.) as direct tool calls
  • MCP servers via the MCP Client node for any Model Context Protocol-compliant service
  • Sub-workflows that package complex multi-step logic as a single callable tool

Step 7 — Deploy and test. Activate the workflow in n8n, then @mention your agent in Teams. It will respond, take actions, and log every interaction with full audit trails.

Enterprise Governance: Two Layers

The power of this setup is its two-layer governance model.

Microsoft Layer:

  • Entra ID enforces agent identity and conditional access. Agents can be scoped to specific users, groups, or applications.
  • Microsoft Defender detects behavioral anomalies and can quarantine compromised agents automatically.
  • Microsoft Purview applies data classification and protection policies to everything the agent reads or writes.

n8n Layer:

  • Role-based access control determines which team members can modify the agent's workflow.
  • Credential management ensures the agent's API keys and OAuth tokens are encrypted and never exposed in plaintext.
  • Input validation and PII detection can be added as preprocessing steps before any data leaves your environment.

Together these layers mean your IT and security teams can audit, govern, and revoke agent access using the same tooling they already use for human employees.

Work IQ API: Copilot Intelligence for Your Agents

Agent 365 also unlocks the Work IQ API (currently in public preview), which gives programmatic access to the same intelligence layer that powers Microsoft 365 Copilot — grounded in your organization's emails, documents, calendar, and Teams conversations.

With Work IQ, your n8n agent can:

  • Summarize an employee's week from their Outlook and Teams activity without any custom data pipeline.
  • Answer questions about a project grounded in SharePoint documents and meeting transcripts.
  • Generate draft responses that match the tone and context of ongoing email threads.

The API now supports Agent-to-Agent (A2A) communication, an open standard that lets multiple agents collaborate as peers. An orchestrator agent can delegate tasks to specialized sub-agents and aggregate their results — all within the governed Work IQ infrastructure.

Real-World Use Cases

Engineering Manager Bot: An engineering manager @mentions the agent in Teams each morning. The agent pulls open incidents from PagerDuty, sprint status from Jira, and on-call schedules from OpsGenie, then posts a structured daily summary directly in the team channel.

HR Onboarding Agent: When a new-hire email arrives in the agent's Outlook inbox, the workflow automatically creates accounts in your HRIS, provisions Okta access, schedules the first week of calendar invites, and sends a personalized welcome message — without human intervention.

Sales Intelligence Agent: Tagged in a SharePoint proposal document, the agent fetches the prospect's data from Salesforce, enriches it with recent news, and appends a competitive analysis section — all before the account executive's next call.

What to Watch Next

Microsoft plans to move Work IQ A2A from preview to general availability in summer 2026. A cross-cloud registry sync with AWS Bedrock and Google Cloud is already in public preview, allowing IT teams to discover and govern agents deployed outside the Microsoft ecosystem.

For n8n, the Agent 365 Trigger node is actively maintained, with updates planned to support proactive agent messaging (agents initiating conversations rather than waiting to be @mentioned) and deep SharePoint file collaboration.

Getting Started

The fastest path to a working agent:

  1. Ensure your organization has Agent 365 licenses ($15/user or E7).
  2. Install the Agent 365 CLI and register your app in Entra ID.
  3. In n8n, add the Microsoft Agent 365 Trigger node to a new workflow.
  4. Attach a model, add at least one tool, and deploy.

The era of "AI bots that need to be called by webhook" is over. Your agents can now show up to the Monday morning standup just like everyone else.