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.
Low maintenance activity. Last release 17 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install identityIdentity library
This Identity library is an authentication/authorization library that:
- Suitable for apps that are targeting end users on Microsoft identity platform, a.k.a. Microsoft Entra ID (which includes Work or school accounts provisioned through Azure AD, and Personal Microsoft accounts such as Skype, Xbox, Outlook.com).
- Currently designed for web apps, regardless of which Python web framework you are using.
- Provides a set of high level API that is built on top of, and easier to be used than Microsoft's MSAL Python library.
- Written in Python, for Python apps.
DISCLAIMER: The code in this repo is not officially supported by Microsoft and is not intended for production use. The intention of this repo is to unblock customers who would like to use a higher level API, before such an API has been migrated to an Microsoft library with official support. Migration of this API to official support is not guaranteed and is not currently on the MSAL roadmap. Please ensure to fully test any code used from this repository to ensure it works in your environment.
Scenarios supported
| Microsoft Entra ID | Microsoft Entra External ID | Microsoft Entra External ID with Custom Domain | Azure AD B2C | |
|---|---|---|---|---|
| App Registration |
Following only the step 1, 2 and 3 of this Quickstart: Add sign-in with Microsoft to a Python web app |
Follow only the page 1 of this Tutorial: Prepare your customer tenant ... |
Coming soon. |
Following only the step 1 and 2 (including 2.1 and 2.2) of this Configure authentication in a sample Python web app by using Azure AD B2C |
After app registration, you shall obtain the following information:
| ||||


