--- id: microsoft-agents-authentication-msal version: "1.3.0" license: MIT license_treatment: permissive maintenance: active --- # microsoft-agents-authentication-msal — A msal-based authentication library for Microsoft Agents License: permissive · Maintenance: active · Downloads: 466.9K/mo ## 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 above — verify before relying. Provides MSAL-based authentication for Microsoft Agents, handling token acquisition from Azure AD so agents can securely communicate with Microsoft services including Teams, Graph API, and Azure resources. 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 pip install microsoft-agents-authentication-msal uv add microsoft-agents-authentication-msal poetry add microsoft-agents-authentication-msal ## Installing microsoft-agents-authentication-msal 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. 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') ) Requires Python >= 3.10 and valid Azure AD credentials (client ID, secret/certificate, and tenant ID) configured via environment variables. 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 - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 466.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags azure ad authentication for agents, msal token management, microsoft agents auth, azure ad token caching, agent authentication library, entra id agent auth, secure agent communication, azure-ad, agent-framework, oauth [View on SkillFed](https://skillfed.io/packages/microsoft-agents-authentication-msal) · [View on PyPI](https://pypi.org/project/microsoft-agents-authentication-msal/)