fastapi-azure-auth

Installation
SKILL.md

FastAPI Azure Entra ID Auth

OAuth2 authorization code flow using MSAL, Starlette sessions, and raw asyncpg RBAC. Designed for the init-app-stack: FastAPI + Granian + asyncpg + uv + Python 3.14.

Packages

uv add msal starlette pem
# starlette is already a fastapi dependency — just needs session middleware enabled

File structure

app/
├── auth/
│   ├── setup.py        ← registers /login, /callback, /logout + AuthMiddleware
│   └── credentials.py  ← returns client secret or certificate dict for MSAL
Related skills
Installs
1
Repository
bmsuisse/skills
GitHub Stars
2
First Seen
Apr 21, 2026