skillfed

microsoft-teams-api

API package for Microsoft Teams

microsoft-teams-api v2.0.15 1.0M downloads/30d#4,464 on PyPI62
Permissive license MIT Active released

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

uv

uv add microsoft-teams-api

poetry

poetry add microsoft-teams-api

Installing 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

microsoft teams bot api clientteams bot framework pythonteams activity modelsteams authentication clientteams api http client
teams-bot-frameworkmicrosoft-integration

More WWW/HTTP packages