---
title: "Building MCP servers with Entra ID and pre-authorized clients"
url: https://daily.dev/posts/building-mcp-servers-with-entra-id-and-pre-authorized-clients-rybvjzni4
source_url: https://blog.pamelafox.org/2026/04/building-mcp-servers-with-entra-id-and.html
type: article
source: "Pamela Fox"
published: 2026-04-02T23:44:53.971Z
updated: 2026-04-02T23:45:19.645Z
tags: ["python", "mcp", "oauth"]
reading_time: 12
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Building MCP servers with Entra ID and pre-authorized clients

**[Pamela Fox](https://daily.dev/sources/pamelafox)** · 12 min read · 0 upvotes · 0 comments

## Summary

A detailed walkthrough of building an authenticated MCP server using Python's FastMCP library and Microsoft Entra ID, targeting pre-authorized clients like VS Code. Covers the MCP auth spec (pre-registration, CIMD, DCR), Entra app registration via the MS Graph SDK, credential options (client secret, certificate, managed identity as federated identity credential), FastMCP's RemoteAuthProvider and AzureJWTVerifier setup, middleware for extracting user identity from JWT claims, and using the On-Behalf-Of (OBO) flow to call Microsoft Graph for admin group membership checks. Includes code for both local development and production Azure Container Apps deployments, with a link to the full open-source repository.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.pamelafox.org/2026/04/building-mcp-servers-with-entra-id-and.html>

## Similar posts on daily.dev

- [Using on-behalf-of flow for Entra-based MCP servers](https://daily.dev/posts/using-on-behalf-of-flow-for-entra-based-mcp-servers-ctc7a7wlt) · Pamela Fox · 0 upvotes · 0 comments
- [Designing an IAM AI Agent Using MCP Server and Entra ID](https://daily.dev/posts/designing-an-iam-ai-agent-using-mcp-server-and-entra-id-inpeapxxg) · InfoSec Write-ups · 1 upvotes · 0 comments
- [Watch the recordings from my Python \+ MCP series](https://daily.dev/posts/watch-the-recordings-from-my-python-mcp-series-nkda0yiah) · Pamela Fox · 1 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#mcp](https://daily.dev/tags/mcp), [#oauth](https://daily.dev/tags/oauth)

[View this post on daily.dev](https://daily.dev/posts/building-mcp-servers-with-entra-id-and-pre-authorized-clients-rybvjzni4)
