msal
The Microsoft Authentication Library (MSAL) for Python library enables your app to access the Microsoft Cloud by supporting authentication of users with Microsoft Azure Active Directory accounts (AAD) and Microsoft Accounts (MSA) using industry standard OAuth2 and OpenID Connect.
Install
msal on PyPI
pip
pip install msaluv
uv add msalpoetry
poetry add msalPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — requests, PyJWT, cryptography |
| Maintenance | actively maintained — 76 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: msal-1.37.0-py3-none-any.whl
About msal
from the package's own PyPI description — quoted content, verbatim
Microsoft Authentication Library (MSAL) for Python
dev branch |
Reference Docs | # of Downloads per different platforms | # of Downloads per recent MSAL versions | Benchmark Diagram |
|---|---|---|---|---|
| Build status (image) | Documentation Status (image) | Downloads (image) | Download monthly (image) | 📉 |
The Microsoft Authentication Library for Python enables applications to integrate with the Microsoft identity platform. It allows you to sign in users or apps with Microsoft...
Read as markdown · JSON record · Source repository · Homepage · Docs
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
MSAL enables Python applications to authenticate users and apps with Microsoft identities (Azure AD, Microsoft Accounts, Azure AD B2C) and obtain tokens for calling Microsoft APIs using OAuth2 and OpenID Connect.
Low friction: pure Python wheel with only three common runtime dependencies (requests, PyJWT, cryptography). Actively maintained with a recent release 76 days ago and ongoing repository activity.
MIT license permits commercial and private use with minimal restrictions; you must include the license notice in distributions but face no copyleft obligations.
Usage
pip install msal
from msal import PublicClientApplication
app = PublicClientApplication("client_id", authority="https://login.microsoftonline.com/tenant")
accounts = app.get_accounts()
if accounts:
result = app.acquire_token_silent(["scope"], account=accounts[0])
You must register your application with the Microsoft identity platform and obtain a client_id before use.
Verdict: MSAL is a production-stable, actively maintained authentication library from Microsoft with no known vulnerabilities, low install friction, and permissive licensing. It is well-suited for applications integrating with Microsoft identity services, though it requires prior registration with the Microsoft identity platform.
Needs verification
- Whether the package's token caching and refresh mechanisms work reliably across different application lifecycle patterns in production.
- Performance characteristics and scalability limits when handling high volumes of concurrent authentication requests.
Similar packages
permissive · top 1,000 on PyPI
idpermissive · top 1,000 on PyPI
msal-extensionspermissive · top 1,000 on PyPI
azure-mgmt-corepermissive · top 1,000 on PyPI
giturlparsepermissive · top 1,000 on PyPI
azure-datalake-storepermissive · top 1,000 on PyPI
azure-mgmt-resourcepermissive · top 1,000 on PyPI
msrestazurepermissive · top 1,000 on PyPI
gcloud-aio-authpermissive · top 1,000 on PyPI
azure-identityunclear · top 1,000 on PyPI