Building MCP servers with Entra ID and pre-authorized clients
The Model Context Protocol (MCP) gives AI agents a standard way to call external tools, but things get more complicated when those tools need to know who the user is. In this post, I’ll show how to build an MCP server with the Python FastMCP package that authenticates users with Microsoft Entra ID when they connect from a pre-authorized client such as VS Code.
If you need to build a server that works with any MCP clients, read my previous blog post. With Microsoft Entra as the authorization ser...
Take me to this post.
April 02, 2026
The Patron Saint of Clues
Not every murder. Those who know something do not know enough to guess how many or what they have in common. It doesn’t seem to be victim, perpetrator, means, motive, or opportunity. It’s just that sometimes a detective appears and for hours or days nobody thinks of questioning their name or authority and afterwards, after the investigation, the summation, and the arrest, the detective is gone and the only remaining facts are that they were there, whoever they were, however they looked like.Bril...
Take me to this post.
April 02, 2026
OpenTelemetry and Observability in Microsoft Agent Framework
OpenTelemetry and Observability in Microsoft Agent Framework
If you're building AI agents in C# with Microsoft Agent Framework (MAF), deploying them without observability is a liability. Microsoft agent framework opentelemetry observability gives you the instrumentation layer you need to understand exactly what your agent is doing -- how many tokens it's consuming, how long each turn takes, which tools are being called, and where failures are occurring. Without that visibility, debugging a misbe...
Take me to this post.
April 02, 2026
How to Implement Factory Method Pattern in C#: Step-by-Step Guide
How to Implement Factory Method Pattern in C#: Step-by-Step Guide
The Factory Method pattern is a creational design pattern that provides an interface for creating objects without specifying their exact classes. Implementing this pattern in C# involves defining a product interface, creating concrete products, establishing a creator abstract class, and implementing concrete creators. This step-by-step guide will walk you through implementing the Factory Method pattern with practical C# examples.
...
Take me to this post.
April 02, 2026
Where Engineering Meets Craft: Edoardo Lunardi’s Obsession with the Details
How obsessing over craft, code quality, and the details nobody notices shaped a decade of creative frontend work....
Take me to this post.
April 02, 2026
Why doesn’t the system let you declare your own messages to have the same semantics as WM_COPYDATA?
Tempting but misleading.
The post Why doesn’t the system let you declare your own messages to have the same semantics as WM_COPYDATA? appeared first on The Old New Thing....
Take me to this post.
April 02, 2026
Composite Design Pattern in C#: Complete Guide with Examples
Composite Design Pattern in C#: Complete Guide with Examples
When you need to represent part-whole hierarchies and treat individual objects the same way you treat groups of objects, the composite design pattern in C# is the structural pattern built for exactly that job. It lets you compose objects into tree structures so that clients can work with single items and collections through a single, uniform interface. No type checking, no special cases -- just polymorphism doing the heavy lifting.
In ...
Take me to this post.
April 02, 2026
CodeSOD: One Case
I feel like we've gotten a few SQL case statement abuses recently, but a properly bad one continues to tickle me. Ken C sends us one that, well:
SELECT CASE h.DOCUMENTTYPE
WHEN 2 THEN 3 WHEN 3 THEN 4 WHEN 4 THEN 5
WHEN 5 THEN 6 WHEN 6 THEN 7 WHEN 7 THEN 8
ELSE h.DOCUMENTTYPE
END AS DocumentType,
h.DOCNMBR AS DocNmbr,
h.FULLPOLICY AS FullPolicy,
h.BATCHID AS BatchId,
h.OrigBatchId,
h.UPDATEDDATE AS UpdatedDate,
h.CUSTOMERNO AS CustomerNo,
h....
Take me to this post.
April 02, 2026