skillfed

msal-extensions

Microsoft Authentication Library extensions (MSAL EX) provides a persistence API that can save your data on disk, encrypted on Windows, macOS and Linux. Concurrent data access will be coordinated by a file lock mechanism.

msal-extensions Permissive license MIT License AGING 45 v1.3.1 released

Install

msal-extensions on PyPI

pip

pip install msal-extensions

uv

uv add msal-extensions

poetry

poetry add msal-extensions

Package facts

License MIT License (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 1 — msal
Maintenance aging — 517 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_extensions-1.3.1-py3-none-any.whl

Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

About msal-extensions

from the package's own PyPI description — quoted content, verbatim

Microsoft Authentication Extensions for Python

The Microsoft Authentication Extensions for Python offers secure mechanisms for client applications to perform cross-platform token cache serialization and persistence. It gives additional support to the Microsoft Authentication Library for Python (MSAL).

MSAL Python supports an in-memory cache by default and provides the SerializableTokenCache to perform cache serialization. You can read more about this in the MSAL Python documentation. Developers are required to implement their own cache persistence across multiple platforms and Microsoft Authentication Extensions makes this simpler.

The supported platforms are Windows, Mac and Linux. - Windows - DPAPI is used for encryption. - MAC - The MAC KeyChain is used. - Linux - LibSecret is used for...

Read as markdown · JSON record · Source repository

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

Provides secure, platform-specific token cache persistence for MSAL Python applications, encrypting sensitive authentication data on Windows (DPAPI), macOS (Keychain), and Linux (LibSecret).

Low friction: pure Python wheel with a single runtime dependency (msal). Maintenance is aging—517 days since last release—but the repository remains active with a recent commit in September 2025, and the package is marked Production/Stable.

MIT License (permissive) allows broad use, modification, and distribution with minimal restrictions, making it suitable for both open-source and proprietary projects.

Usage

pip install msal-extensions

from msal_extensions import PersistedTokenCache, FilePersistence

persistence = FilePersistence("token_cache.bin")
cache = PersistedTokenCache(persistence)
# Use with: msal.PublicClientApplication(client_id, token_cache=cache)

Requires Python ≥3.9. On Linux, LibSecret system library must be available; on Windows and macOS, platform encryption APIs are built-in.

Verdict: Production-ready library for desktop and CLI applications needing encrypted token persistence with MSAL. Low install friction, permissive licensing, and no known vulnerabilities make it safe to adopt. Aging maintenance (517 days since release) is typical for stable infrastructure; however, recent repository activity and Production/Stable status indicate ongoing support. Not recommended for web applications due to scalability concerns.

Needs verification

  • Whether LibSecret availability on Linux is automatically detected or requires manual configuration
  • Performance characteristics under high-concurrency scenarios beyond the stated web-app limitation
  • Backward compatibility guarantees across minor version updates
msal token cache persistenceencrypted credential storage pythonazure authentication cachecross-platform secure token storagemsal extensionspython keychain encryptionazure ad token persistence

Similar packages