--- id: identity version: "0.11.0" license: MIT license_treatment: permissive maintenance: aging --- # 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. License: permissive · Maintenance: aging · Downloads: 224.3K/mo ## 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 above — 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 pip install identity uv add identity 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_current - Install friction: low - Maintenance: aging - Downloads: 224.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags microsoft entra id authentication, azure ad python web app, msal wrapper library, python oauth2 microsoft, azure ad b2c sign-in, microsoft-identity, oauth2-wrapper [View on SkillFed](https://skillfed.io/packages/identity) · [View on PyPI](https://pypi.org/project/identity/)