Skip to main content

36 posts tagged with "Microsoft 365 Agents SDK"

Microsoft 365 Agents SDK for Building Intelligent Agents

View All Tags

Fixed: "error CS0104: 'IMiddleware' is an ambiguous reference between 'Microsoft.Agents.Builder.IMiddleware' and 'Microsoft.AspNetCore.Http.IMiddleware'"

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

I wrote my first middleware for a Microsoft 365 Agents SDK agent, a class that implements the SDK's IMiddleware interface, and the build stopped with error CS0104. ASP.NET Core has an IMiddleware interface too, and the web project had imported it into every file without my asking. A one-line alias fixed it.

How to Log the JSON of an Incoming Activity in the Microsoft 365 Agents SDK in C#

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

When an agent misbehaves, the first question is what actually arrived. In the Microsoft 365 Agents SDK, one call answers it: ToJson() turns the incoming activity into JSON, and your logger writes it out. That's the only way to see the raw activity once your agent runs in Teams or Microsoft 365 Copilot, where no test tool shows it to you.

How to Send a Custom Activity from the Microsoft 365 Agents Playground

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

Some activities never come from typing: a web page telling your agent the user switched to dark mode, a thumbs-up on a reply. The Microsoft 365 Agents Playground can send them anyway. Its Custom activity option lets you write any activity as JSON and deliver it to your agent, so you can test the code that handles it on your own machine.