$npx skillfedfor your agent

fastapi-azure-auth

Easy and secure implementation of Azure Entra ID for your FastAPI APIs

Worth itPyPI Software DevelopmentReleased Jul 2026554.9K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — fastapi_azure_auth-5.3.0-py3-none-any.whl
v5.3.0 · released 2026-07-02 · Python >=3.11 · 6 runtime deps: anyio, cryptography, fastapi, httpx2, pydantic, pyjwt

Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and directly solves a common enterprise requirement. If your FastAPI application needs Azure Entra ID authentication, this is a purpose-built solution that handles the OAuth2 and token validation details. Install it if you are deploying to an Azure-centric organization; skip it if you use a different identity provider.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Azure Entra ID tenant and application registration; OAuth2 configuration in FastAPI app must include swagger_ui_oauth2_redirect_url and swagger_ui_init_oauth.
  • Low install friction with a pure Python wheel.
  • Actively maintained with a recent release (43 days old) and 678 repository stars.

License · maintenance · safety

permissive license (permissive) — MIT license permits commercial and private use with minimal restrictions, making it suitable for enterprise deployments.

last release 2026-07-02 (43 days) · last repo commit 2026-07-02 · 678 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 554,887 downloads/mo, #6,030 on PyPI

Verify before relying

pip install fastapi-azure-auth

from fastapi_azure_auth.auth import SingleTenantAzureAuthorizationCodeBearer

azure_scheme = SingleTenantAzureAuthorizationCodeBearer(
    app_client_id='your-client-id',
    tenant_id='your-tenant-id',
    scopes={'api://your-client-id/user_impersonation': 'user_impersonation'}
)
  • Whether token caching or refresh-token handling is built in or requires custom implementation.
  • Support for custom claim validation beyond standard OpenID Connect claims.
  • Performance characteristics under high-concurrency workloads.
Same gist for agents: .md · .json

What it is and what it does

FastAPI-Azure-Auth integrates Azure Entra ID authentication into FastAPI applications, eliminating the need to build OAuth2 token validation and authorization logic from scratch. It supports single-tenant, multi-tenant, and B2C authentication flows, with scope-based access control and tenant validation. The package wraps FastAPI's OAuth2 security scheme and handles OpenID Connect discovery, token validation via cryptography and pyjwt, and provides Swagger UI integration for interactive authentication during development.

The package depends on fastapi, pydantic for configuration, httpx2 for HTTP calls, cryptography and pyjwt for token verification, and anyio for async operations. Setup involves registering an Azure application, configuring FastAPI with OAuth2 redirect settings, and instantiating the appropriate bearer scheme (SingleTenant, MultiTenant, or B2C) as a dependency. Once configured, routes can enforce authentication and specific scopes declaratively.

Use it for

  • Protect FastAPI APIs with Azure Entra ID in enterprise environments where Azure is the identity provider.
  • Build multi-tenant SaaS applications that authenticate users from multiple Azure tenants with tenant isolation.
  • Implement scope-based authorization to restrict API endpoints to users with specific permissions.
  • Add Swagger UI authentication to FastAPI OpenAPI documentation for testing authenticated endpoints interactively.
  • Migrate existing Azure AD authentication from other frameworks to FastAPI without rewriting auth logic.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained, has no known vulnerabilities, low install friction, and directly solves a common enterprise requirement. If your FastAPI application needs Azure Entra ID authentication, this is a purpose-built solution that handles the OAuth2 and token validation details. Install it if you are deploying to an Azure-centric organization; skip it if you use a different identity provider.

Install

fastapi-azure-auth on PyPI

Before you install

Low install friction with a pure Python wheel. Actively maintained with a recent release (43 days old) and 678 repository stars. Supports current Python versions (3.11–3.14).

Requires Azure Entra ID tenant and application registration; OAuth2 configuration in FastAPI app must include swagger_ui_oauth2_redirect_url and swagger_ui_init_oauth.

License in practice

MIT license permits commercial and private use with minimal restrictions, making it suitable for enterprise deployments.

Quickstart

pip install fastapi-azure-auth

from fastapi_azure_auth.auth import SingleTenantAzureAuthorizationCodeBearer

azure_scheme = SingleTenantAzureAuthorizationCodeBearer(
    app_client_id='your-client-id',
    tenant_id='your-tenant-id',
    scopes={'api://your-client-id/user_impersonation': 'user_impersonation'}
)

Verify before relying

  • Whether token caching or refresh-token handling is built in or requires custom implementation.
  • Support for custom claim validation beyond standard OpenID Connect claims.
  • Performance characteristics under high-concurrency workloads.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.11
Install frictionLow. Pure-Python wheel
Runtime dependencies
6 packages
anyiocryptographyfastapihttpx2pydanticpyjwt
MaintenanceActively maintained 43 days since the last release
Last repo commit
First released
Downloads554,887 / month, #6,030 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python Modules

Evidence: fastapi_azure_auth-5.3.0-py3-none-any.whl

Tags

Capabilities
azure entra id fastapiazure ad authenticationfastapi oauth2 azureazure entra fastapifastapi azure authorizationazure ad fastapi securityentra id oauth2
Topics
azure-entra-idoauth2-fastapienterprise-auth
PyPI keywords
adasyncasyncioauthenticationazureazure adazure entraazure entra idazureadentra idfastapimulti tenantoauth2oidcsecuritysingle tenantstarlettetrio

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “azure entra id fastapi”

  • fastapi-azure-authAdds Azure Entra ID (formerly Azure AD) authentication and…
  • identityProvides a high-level authentication and authorization API for Python…
  • azure-identityProvides Microsoft Entra ID token-based authentication for Azure SDK…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also identity · axioms-fastapi · fastapi-auth0 · msal · azure-identity · fastapi-keycloak-middleware · redis-entraid · fastapi-cloudauth · fastapi-cli · cadwyn