microsoft-teams-api
API package for Microsoft Teams
What it is and what it does
microsoft-teams-api is a Python client library for integrating with Microsoft Teams via the Bot Framework. It wraps HTTP communication to Teams APIs and provides typed Pydantic models for activities, authentication flows (ClientCredentials and TokenCredentials), and specialized clients for bots, users, conversations, teams, and meetings. The library handles JWT token operations and validates incoming activity payloads against defined schemas.
Developers use it to build Teams bots and integrations that need to authenticate with Microsoft services, send and receive typed messages, and interact with Teams resources. It depends on microsoft-teams-cards, microsoft-teams-common, pydantic for validation, and pyjwt for token handling. The package targets Python 3.11+ and is maintained actively within the microsoft/teams.py monorepo.
Use it for:
- Build a Teams bot that receives and responds to messages using typed Activity models for validation
- Authenticate with Microsoft Teams APIs using ClientCredentials for service-to-service scenarios
- Fetch bot and user tokens from Teams infrastructure for downstream Graph API calls
- Validate and deserialize incoming Teams activities in a webhook handler
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
HTTP client library for Microsoft Teams Bot Framework APIs, providing typed models, authentication handlers, and bot/user/conversation/team/meeting API clients.
Yes, if you are building a Teams bot or integration. The package is actively maintained, has low install friction, carries a permissive MIT license, and provides the core typed API surface needed for Teams Bot Framework work. No known vulnerabilities as of 2026-08-14. Requires Python 3.11+.
Install
microsoft-teams-api on PyPI
pip
pip install microsoft-teams-apiuv
uv add microsoft-teams-apipoetry
poetry add microsoft-teams-apiInstalling microsoft-teams-api
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a recent commit on 2026-08-13 and a release 10 days ago. Requires Python 3.11 or later.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most deployment scenarios.
Quickstart
pip install microsoft-teams-api
from microsoft_teams.api import ClientCredentials, ApiClient
credentials = ClientCredentials(client_id="app-id", client_secret="app-secret")
api = ApiClient("https://smba.trafficmanager.net/amer/")
token_response = await api.bots.token.get(credentials)
Requires Python 3.11 or later; async/await usage requires an async runtime context.
Verify before relying
- Whether TokenCredentials accepts a callable or requires pre-fetched tokens
- Scope and completeness of Teams Bot Framework API coverage relative to official Microsoft SDKs
- Whether all API clients support async/await or only specific ones
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — microsoft-teams-cards, microsoft-teams-common, pydantic, pyjwt |
| Maintenance | actively maintained — 10 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,033,734/month — #4,464 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: microsoft_teams_api-2.0.15-py3-none-any.whl
Keywords: agents, ai, bot, microsoft, teams
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
microsoft-teams-appsFramework for building Microsoft Teams…
permissive · top 15,000 on PyPI
microsoft-agents-hosting-teamsProvides Teams-specific handlers and utilities…
permissive · top 15,000 on PyPI
stravalibstravalib provides a Python client for…
permissive · top 15,000 on PyPI
microsoft-agents-activityProvides core types and schemas implementing…
permissive · top 5,000 on PyPI
pymsteamsSends formatted messages to Microsoft Teams…
permissive · top 5,000 on PyPI
microsoft-teams-cardsProvides Pydantic-based models for building…
permissive · top 5,000 on PyPI
botframework-connectorEnables Python bots to send and receive…
permissive · top 5,000 on PyPI
mattermostwrapperA Python wrapper for the Mattermost v4 API that…
permissive · top 15,000 on PyPI
wandelbots_api_clientPython SDK for authenticating with and making…
permissive · top 15,000 on PyPI
microsoft-agents-copilotstudio-clientConnects Python applications to AI agents…
permissive · top 15,000 on PyPI