Registry / communication / microsoft-teams-api

microsoft-teams-api

JSON →
library2.0.0pypypi✓ verified 80d ago

Official Python SDK for building Microsoft Teams apps, bots, and message extensions. Current version 2.0.0 (stable), requiring Python 3.12+. The v2.0.0 release introduces a new namespace `microsoft_teams` (replacing `microsoft.teams`), proactive threading support, and sovereign cloud endpoints. Release cadence is irregular, with alpha releases leading to the stable v2.0.0.

pip install microsoft-teams-api
INSTALL
IMPORT
SIG · MICROSOFT-TEAMS-AP
M
microsoft-teams-api
communicationpythonv2.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TeamsApp
import microsoft_teams
from microsoft_teams import TeamsApp

Minimal Teams bot using the new microsoft_teams namespace.

import os from microsoft_teams import TeamsApp # Initialize the app app = TeamsApp( app_id=os.environ.get("TEAMS_APP_ID", ""), app_password=os.environ.get("TEAMS_APP_PASSWORD", ""), ) # Register a simple message handler @app.on_message async def on_message(context, activity): await context.reply("Hello from Teams SDK!") # Start the bot app.run()
teamsapi --version
Debug
Known issues
breakingNamespace changed from `microsoft.teams` to `microsoft_teams` in v2.0.0. All import paths must be updated.
fix
Replace all imports from `microsoft.teams.*` with `microsoft_teams.*`.
affects: >=2.0.0
breakingHttpPlugin replaced by HttpServer and HttpServerAdapter. Existing HttpPlugin code will break.
fix
Use HttpServer and HttpServerAdapter from microsoft_teams.server.
affects: >=2.0.0a20
gotchaPython requirement is 3.12+ (not 3.11 or lower). Installation will fail on older Python versions.
fix
Ensure Python >=3.12 is used.
affects: >=2.0.0
deprecatedCustom logger removed; use standard logging library.
fix
Replace custom logger calls with import logging.
affects: >=2.0.0a20
gotchaSovereign cloud endpoints (GCCH, DoD, China) require explicit configuration. Default endpoint only works for global Azure.
fix
Initialize TeamsApp with `cloud='GCCH'` or `cloud='DoD'` for those environments.
affects: >=2.0.0a58
Upgrade
Version history
2.0.0latest on PyPI · released Apr 30, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
10
OpenAI (training)
1
Resources
microsoft-teams-api — pip install microsoft-teams-api · libregistry