skillfed

streamlit-msal

Add your description here

streamlit-msal v0.2.0 111.6K downloads/30d#12,407 on PyPI36
License unclear DORMANT released

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-msal

uv

uv add streamlit-msal

poetry

poetry add streamlit-msal

Installing 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

streamlit azure authenticationmsal streamlit integrationmicrosoft login streamlitazure ad streamlitstreamlit oauth microsoftstreamlit single sign on
azure-adstreamlit-extension

More Security packages