skillfed

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.

msal Permissive license MIT Active 967 v1.37.0 released

Install

msal on PyPI

pip

pip install msal

uv

uv add msal

poetry

poetry add msal

Package 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

Development Status :: 5 - Production/StableLicense :: 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.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

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.
microsoft authentication pythonazure ad login sdkoauth2 openid connect microsoftmicrosoft identity platform pythonazure active directory authenticationmicrosoft graph token acquisitionentra id python sdk

Similar packages