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.
Install
msal-extensions on PyPI
pip
pip install msal-extensionsuv
uv add msal-extensionspoetry
poetry add msal-extensionsPackage 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
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...
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
Similar packages
permissive · top 1,000 on PyPI
msalpermissive · top 1,000 on PyPI
azure-mgmt-corepermissive · top 1,000 on PyPI
filelockpermissive · top 100 on PyPI
azure-servicebusunclear · top 1,000 on PyPI
cryptographypermissive · top 100 on PyPI
PyPDF2permissive · top 1,000 on PyPI
azure-datalake-storepermissive · top 1,000 on PyPI
sphinxcontrib-devhelppermissive · top 1,000 on PyPI
keyringpermissive · top 1,000 on PyPI