examples/auth/azure_oauth/README.md
This example demonstrates how to use the Azure OAuth provider with FastMCP servers.
http://127.0.0.1:8000/auth/callback (Web platform)Create a .env file:
# Required
AZURE_CLIENT_ID=your-application-client-id
AZURE_CLIENT_SECRET=your-client-secret-value
AZURE_TENANT_ID=your-tenant-id # From Azure Portal Overview page
Start the server:
uv run python server.py
Test with client:
uv run python client.py
The tenant_id parameter is required and controls which accounts can authenticate:
organizations: Any work/school accountconsumers: Personal Microsoft accounts only