What the M365 Agents SDK Actually Does

▶ Watch (05:02)

The Microsoft 365 Agents SDK is open-source, ships in C#, JavaScript, and Python, and wraps whatever AI model, orchestrator, and knowledge source your organization already uses, then deploys it to Teams, M365 Copilot, or Web Chat. Bring Semantic Kernel, LangChain, or a raw OpenAI call. The SDK handles conversation state, storage, and Entra authentication so you don’t rebuild those per channel.

The Agents Toolkit adds a Visual Studio extension with File, New templates for common stacks. The embedded Agent Playground replaces the Bot Framework Emulator and lets you test locally before touching any cloud channel.

From Console App to Four Channels in 15 Minutes

▶ Watch (08:49)

Barbour started with a Semantic Kernel console app that calls the OpenWeather API and returns an adaptive card. He added three SDK objects to the program file (Cloud Adapter, Memory Storage, Agent Application), wired in the Semantic Kernel services, and swapped console output for agent activity responses. Total time: 15 minutes. He showed the Semantic Kernel weather agent running in Agent Playground (08:49), then demoed the same agent in four channels live (19:59): Agent Playground, Teams, M365 Copilot, and Azure Bot Web Chat.

Channel-specific behavior sits in extensions, not in the core agent code. Teams-only constructs like message extensions load through the Teams extension. Everything else (adaptive cards, streaming, general messaging) lives in the shared SDK core.

Streaming Responses, Multi-Agent Dispatch, and Auth

▶ Watch (22:01)

M365 Copilot chat drops an agent after 15 seconds with no reply. Switching from send-message to streaming response is one line; the SDK adapts the stream format to each channel automatically.

“We don’t want you to have to deal with this crap anymore.” — Matt Barbour

The multi-agent dispatcher with Copilot Studio token exchange (25:59) shows auth end-to-end. OpenAI returns a plan calling a Copilot Studio tool. The SDK intercepts, acquires a scoped Entra token for the signed-in user, and passes it through. The agent runs as a system account; the downstream call arrives as the actual user. OAuth handlers registered per route control scope, keeping the user consent dialog short.

M365 Copilot APIs: Retrieval, Chat, and Meeting Insights

▶ Watch (34:12)

Four M365 Copilot APIs sit alongside the SDK. The Retrieval API grounds requests on SharePoint data without copying it out of M365, scoped to specific folders or documents. The Chat API delivers M365 Copilot completions programmatically. Meeting Insights returns action items and summaries from finished Teams calls. The Interactions Export API surfaces user prompt history for analytics.

The Retrieval API live demo against SharePoint (37:40) ran against a private-preview build. The agent acquired a Graph token scoped to the user, pulled grounding data from a SharePoint folder, and handed it to Semantic Kernel. A spin loop from the same-morning build drop required a second attempt before results appeared.

KPMG: Tax Intelligence Across 1,000 Entra Tenants

▶ Watch (47:12)

KPMG’s Digital Gateway serves 250,000 employees with GenAI personas built by tax professionals on top of KPMG thought leadership and regulatory data. The KPMG Digital Gateway GenAI in Teams demo (50:57) surfaced the Global Tax Incentive Researcher persona inside Teams, returning incentive guidance for Mexico automobile manufacturing in a Markdown adaptive card.

“What is happening behind the scene is far from ordinary.” — Renil Abdulkader

The Agents SDK token exchange handles auth across hundreds of client Entra tenants. KPMG generates an on-behalf-of token for each logged-in user; Teams shows nothing. Processing stays in Digital Gateway and the response renders in Teams.

Q&A

Did I miss the step where you deployed your code to Teams or M365 Copilot? Barbour confirmed he deployed nothing: everything ran off his laptop, with only an Azure Bot Service registration and a Teams app manifest in the cloud; the Agent Toolkit has an automated deployment feature for production use, but it was not the focus of the session. ▶ 58:49

Notable Quotes

We don’t want you to have to deal with this crap anymore. Matt Barbour · ▶ 30:55

Did you just make auth easy, Matt? Sarah Critchley · ▶ 31:07

It will give you an error message within 15 seconds Matt Barbour · ▶ 25:31

What is happening behind the scene is far from ordinary. Renil Abdulkader · ▶ 52:13

Key Takeaways

  • The M365 Agents SDK wraps any AI model and orchestrator to deploy to Teams, M365 Copilot, and Web Chat without rewriting code per channel.
  • Streaming responses are mandatory for M365 Copilot chat, which times out in 15 seconds if the agent sends nothing.
  • The SDK handles Entra token exchange automatically so agents call Copilot Studio or Graph APIs as the signed-in user, not a system account.