$npx skillfedfor your agent

microsoft-agents-authentication-msal

A msal-based authentication library for Microsoft Agents

Worth itPyPI SecurityReleased Jul 2026466.9K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — microsoft_agents_authentication_msal-1.3.0-py3-none-any.whl
v1.3.0 · released 2026-07-30 · Python >=3.10 · 3 runtime deps: microsoft-agents-hosting-core, msal, requests

Yes. The package is actively maintained, has low install friction, carries a permissive MIT license, and solves a concrete problem for anyone building agents with the Microsoft 365 Agents SDK that need to call Azure AD-protected services. No known vulnerabilities. Install it if you are using the Microsoft Agents framework and need to authenticate with Azure resources.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python >= 3.10 and valid Azure AD credentials (client ID, secret/certificate, and tenant ID) configured via environment variables.
  • Low friction install with three runtime dependencies.
  • Active maintenance: released 15 days ago, last commit 2026-08-13, repository has 1036 stars and is not archived.

License · maintenance · safety

MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; suitable for most enterprise and open-source scenarios.

last release 2026-07-30 (15 days) · last repo commit 2026-08-13 · 1,036 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 466,871 downloads/mo, #6,501 on PyPI

Verify before relying

pip install microsoft-agents-authentication-msal

from microsoft_agents_authentication_msal import MsalAuth

# Configure with client credentials from environment
auth = MsalAuth(
    client_id=os.getenv('CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTID'),
    client_secret=os.getenv('CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTSECRET'),
    tenant_id=os.getenv('CONNECTIONS__SERVICE_CONNECTION__SETTINGS__TENANTID')
)
  • Whether token caching behavior and refresh intervals are configurable or automatic.
  • Specific scopes and permissions required for different Microsoft services (Teams, Graph API, etc.).
  • Support for certificate-based and managed identity authentication beyond client secret flow.
Same gist for agents: .md · .json

What it is and what it does

This package wraps Microsoft Authentication Library (MSAL) to provide authentication for agents built with the Microsoft 365 Agents SDK. It abstracts the complexity of obtaining and refreshing OAuth tokens from Azure AD, enabling agents to authenticate securely when calling Microsoft services like Teams, Microsoft Graph, and other Azure resources.

The library supports multiple authentication types (client secret, certificate, managed identity) and is designed to integrate with the broader Microsoft Agents framework. It handles token caching and multi-tenant scenarios, allowing agents to operate across different Azure AD tenants. The package is part of a larger SDK ecosystem for building enterprise conversational AI agents.

Use it for

  • Authenticate a Teams bot or agent to call Microsoft Graph API on behalf of the organization.
  • Enable secure agent-to-agent communication within an enterprise Azure AD tenant.
  • Use managed identity authentication in Azure-hosted agents to avoid storing secrets.
  • Implement on-behalf-of (OBO) flow so agents can act on behalf of signed-in users.
  • Build multi-tenant agents that work across different Azure AD organizations.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained, has low install friction, carries a permissive MIT license, and solves a concrete problem for anyone building agents with the Microsoft 365 Agents SDK that need to call Azure AD-protected services. No known vulnerabilities. Install it if you are using the Microsoft Agents framework and need to authenticate with Azure resources.

Install

microsoft-agents-authentication-msal on PyPI

Before you install

Low friction install with three runtime dependencies. Active maintenance: released 15 days ago, last commit 2026-08-13, repository has 1036 stars and is not archived.

Requires Python >= 3.10 and valid Azure AD credentials (client ID, secret/certificate, and tenant ID) configured via environment variables.

License in practice

MIT license permits commercial and private use with minimal restrictions; suitable for most enterprise and open-source scenarios.

Quickstart

pip install microsoft-agents-authentication-msal

from microsoft_agents_authentication_msal import MsalAuth

# Configure with client credentials from environment
auth = MsalAuth(
    client_id=os.getenv('CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTID'),
    client_secret=os.getenv('CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTSECRET'),
    tenant_id=os.getenv('CONNECTIONS__SERVICE_CONNECTION__SETTINGS__TENANTID')
)

Verify before relying

  • Whether token caching behavior and refresh intervals are configurable or automatic.
  • Specific scopes and permissions required for different Microsoft services (Teams, Graph API, etc.).
  • Support for certificate-based and managed identity authentication beyond client secret flow.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
microsoft-agents-hosting-coremsalrequests
MaintenanceActively maintained 15 days since the last release
Last repo commit
First released
Downloads466,871 / month, #6,501 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Operating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Evidence: microsoft_agents_authentication_msal-1.3.0-py3-none-any.whl

Tags

Capabilities
azure ad authentication for agentsmsal token managementmicrosoft agents authazure ad token cachingagent authentication libraryentra id agent authsecure agent communication
Topics
azure-adagent-frameworkoauth

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “azure ad authentication for agents”

Give your agent the search over MCP, or paste the wish link into any chat.

More Security packages

SecretStorage With conditions
PyPI · Python Modules · released Nov 2025

Provides Python bindings to the FreeDesktop.org Secret Service API for securely storing and retrieving passwords and secrets through GNOME Keyring, KWallet, or KeePassXC.

BSD-3-Clausepure Python · 3.10+aging
226.9Mdownloads / mo
msal Worth it
PyPI · Security · released May 2026

MSAL for Python handles OAuth2 and OpenID Connect authentication with Microsoft identity services, managing token acquisition, caching, and refresh for applications integrating with Microsoft Entra ID, Microsoft Accounts, and Azure AD B2C.

MITpure Python · 3.9+
223.0Mdownloads / mo
joserfc Worth it
PyPI · Security · released Jul 2026

joserfc implements JOSE standards (JWS, JWE, JWK, JWT, and related RFCs) for signing, encrypting, and managing JSON-based cryptographic tokens in Python.

BSD-3-Clausepure Python · 3.10+
155.5Mdownloads / mo
Authlib Worth it
PyPI · Security · released May 2026

Authlib provides a complete implementation of OAuth 1.0, OAuth 2.0, and OpenID Connect 1.0 for building both authentication clients and servers, with built-in support for JWS, JWK, JWA, and JWT standards.

BSD-3-Clausepure Python · 3.10+
155.1Mdownloads / mo
argon2-cffi-bindings With conditions
PyPI · Python Modules · released Jul 2025

Provides low-level CFFI bindings to the official Argon2 password hashing algorithm for use by libraries and applications that need direct access to Argon2 without higher-level abstractions.

MITcompiled wheel · 3.9+
74.2Mdownloads / mo
adal Skip
PyPI · Security · released Apr 2021

ADAL for Python authenticates applications with Azure Active Directory to obtain tokens for accessing Azure AD-protected resources.

Install only if maintaining existing code that already depends on it, and plan a migration.

MITpure Pythonabandoned
44.5Mdownloads / mo

See also microsoft-agents-hosting-fastapi · identity · microsoft-agents-hosting-aiohttp · microsoft-agents-hosting-teams · microsoft-agents-hosting-core · streamlit-msal · taktile-auth · msal-extensions

Further reading