streamlit-msal
Add your description here
What it is and what it does
streamlit-msal wraps Microsoft's Authentication Library to bring Azure AD authentication into Streamlit apps. It provides two integration modes: a pre-built UI component that handles sign-in, sign-out, and token management in the sidebar, or a headless API for building custom authentication flows. The library relies on browser pop-ups for user interaction, which keeps setup simple but may not suit all deployment scenarios.
The package is designed for straightforward use cases where Azure AD integration is the primary authentication need. It extracts user identity (name, username, account ID) and access tokens from the authentication response, making them available to your Streamlit code. No runtime dependencies means lightweight installation, but the dormant maintenance status and lack of a declared license introduce uncertainty about long-term support and legal clarity.
Use it for:
- Add Azure AD sign-in to internal Streamlit dashboards without building custom OAuth flows.
- Protect Streamlit apps with corporate identity verification for enterprise deployments.
- Extract user identity and access tokens to authorize downstream API calls on behalf of authenticated users.
- Build quick prototypes that require Microsoft account authentication without external auth infrastructure.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds Microsoft Authentication Library (MSAL) integration to Streamlit applications, enabling Azure AD sign-in via pop-up windows with minimal setup.
Yes, with conditions. Install if you need basic Azure AD authentication in a Streamlit app and can accept pop-up-based sign-in. The low install friction and zero runtime dependencies make it lightweight. However, dormant maintenance and an undefined license are concerns—verify compatibility with your Streamlit version and clarify the license terms with the maintainer before using in production. Not suitable if you need robust token refresh, non-pop-up flows, or ongoing security updates.
Install
streamlit-msal on PyPI
pip
pip install streamlit-msaluv
uv add streamlit-msalpoetry
poetry add streamlit-msalInstalling streamlit-msal
Before you install
Low install friction with no runtime dependencies. Dormant maintenance status since latest release on 2023-11-24; the repository remains active but receives no ongoing development.
License in practice
License treatment is unclear; the package metadata does not declare a license, leaving terms of use and redistribution rights undefined.
Quickstart
pip install streamlit-msal
import streamlit as st
from streamlit_msal import Msal
auth_data = Msal.initialize_ui(
client_id="your-client-id",
authority="https://login.microsoftonline.com/",
scopes=[]
)
if auth_data:
st.write(f"Hello {auth_data['account']['name']}!")
Requires an Azure app registration with OpenID Connect configured and a valid client_id and authority URL.
Verify before relying
- Whether pop-up-based authentication works reliably across all Streamlit deployment environments (cloud, containers, etc.)
- Current compatibility with recent Streamlit versions and whether the dormant status indicates unresolved breaking changes
- Whether the library handles token refresh and expiration gracefully in long-running Streamlit sessions
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 994 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 111,643/month — #12,407 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: streamlit_msal-0.2.0-py3-none-any.whl
Tags
More Security packages
Provides Python bindings to the FreeDesktop.org…
permissive · top 1,000 on PyPI
msalMSAL for Python handles OAuth2 and OpenID…
permissive · top 1,000 on PyPI
joserfcjoserfc implements JOSE standards (JWS, JWE,…
permissive · top 1,000 on PyPI
AuthlibAuthlib provides a complete implementation of…
permissive · top 1,000 on PyPI
argon2-cffi-bindingsProvides low-level CFFI bindings to the…
permissive · top 1,000 on PyPI
adalADAL for Python authenticates applications with…
permissive · top 1,000 on PyPI
identityProvides a high-level authentication and…
permissive · top 15,000 on PyPI
streamlit-authenticatorAdds user authentication and access control to…
permissive · top 15,000 on PyPI
microsoft-agents-authentication-msalProvides MSAL-based authentication for…
permissive · top 15,000 on PyPI
extra-streamlit-componentsProvides additional UI components for Streamlit…
permissive · top 15,000 on PyPI
streamlit-js-evalStreamlit-js-eval lets you run arbitrary…
unclear · top 15,000 on PyPI
streamlit-sortablesStreamlit Sortables adds drag-and-drop sortable…
permissive · top 15,000 on PyPI
azure-identityProvides Microsoft Entra ID token-based…
unclear · top 1,000 on PyPI
django-auth-adfsIntegrates Django applications with Microsoft…
permissive · top 15,000 on PyPI