skillfed

identity

This is an authentication/authorization library, currently optimized for web apps. It provides some higher level APIs built on top of Microsoft's MSAL Python.

identity v0.11.0 224.3K downloads/30d#9,234 on PyPI63
Permissive license MIT AGING released

What it is and what it does

Identity is a wrapper around Microsoft's MSAL Python library that exposes a simpler, higher-level API for authenticating users in Python web applications against Microsoft identity platforms (Entra ID, Azure AD B2C, and variants). It handles session management, token renewal, incremental consent flows, and access token caching automatically, reducing the boilerplate needed to integrate Microsoft authentication into Flask, Django, or Quart apps.

The library is designed for web apps and currently supports sign-in/sign-out workflows and calling downstream web APIs with automatic token refresh. It is not officially supported by Microsoft and carries an explicit disclaimer recommending full testing before any production use. The package is in Beta status and has not seen a release since 2025-07-07, though the repository remains active.

Use it for:

  • Add Microsoft Entra ID sign-in to a Python Flask or Django web app without writing low-level OAuth2 token handling code.
  • Implement Azure AD B2C authentication in a Python web application with automatic session renewal and consent management.
  • Build a web app that calls a downstream Microsoft-protected API on behalf of a signed-in user, with automatic token caching and refresh.
  • Migrate from direct msal usage to a higher-level abstraction when building multi-tenant web apps targeting Microsoft identity providers.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a high-level authentication and authorization API for Python web apps integrating with Microsoft Entra ID, Azure AD B2C, and related Microsoft identity platforms, built on top of the MSAL library.

Yes, if you are building a Python web app that needs Microsoft Entra ID or Azure AD B2C authentication and are willing to accept the non-production disclaimer and aging maintenance status. The low install friction and permissive license make it a reasonable choice for reducing boilerplate, but verify thoroughly in your environment and monitor the repository for updates. Not recommended for production systems requiring official vendor support.

Install

identity on PyPI

pip

pip install identity

uv

uv add identity

poetry

poetry add identity

Installing identity

Before you install

Low install friction with a pure-Python wheel distribution. Maintenance status is aging—the last release was in 2025-07-07—but the repository remains active with recent commits and no archived status. The package carries an explicit disclaimer that it is not officially supported by Microsoft and not intended for production use.

License in practice

Licensed under MIT (permissive), so you can use, modify, and distribute the package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install "identity[flask]"

from identity import Identity

identity = Identity(client_id="your-client-id", client_credential="your-secret")

Requires app registration with Microsoft Entra ID or Azure AD B2C to obtain client_id and credentials; a redirect URI must be configured in your identity provider.

Verify before relying

  • Whether the package's high-level API meaningfully reduces boilerplate compared to direct msal use in typical web app scenarios.
  • Current production readiness and stability given the aging maintenance status and explicit non-production disclaimer.
  • Support timeline and likelihood of migration to official Microsoft support, as mentioned in the disclaimer.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 2 — msal, requests
Maintenance aging — 403 days since the last release
Last repo commit
First released
Downloads 224,318/month — #9,234 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: identity-0.11.0-py3-none-any.whl

Keywords: identity, auth, authentication, authorization

Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

microsoft entra id authenticationazure ad python web appmsal wrapper librarypython oauth2 microsoftazure ad b2c sign-in
microsoft-identityoauth2-wrapper

More WWW/HTTP packages