Registry / devops / microsoft-teams-apps

microsoft-teams-apps

JSON →
library2.0.12pypypiunverified

The official Python SDK for building and deploying Microsoft Teams agents, bots, and message extensions. Current version 2.0.12. Provides high-level abstractions for Teams-specific features like adaptive cards, task modules, and Teams SSO. Released bi-weekly mainly via minor patches to the underlying Teams AI SDK.

pip install microsoft-teams-apps
INSTALL
IMPORT
SIG · MICROSOFT-TEAMS-AP
M
microsoft-teams-apps
devopspythonv2.0.12
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.

TeamsBot
from microsoft_teams import TeamsBot
from teams.app import TeamsBot

Minimal bot that responds to 'hello' messages. Requires BOT_ID and BOT_PASSWORD environment variables set to valid Microsoft Entra ID app credentials.

import os from teams.app import TeamsApp from teams.auth import Auth from teams.card import AdaptiveCard # Initialize app with bot ID and password from env app = TeamsApp( bot_id=os.environ.get('BOT_ID', ''), bot_password=os.environ.get('BOT_PASSWORD', '') ) @app.route_message('hello') async def handle_hello(context): await context.send_activity("Hello from Teams!") # Start the bot (runs until Ctrl+C) app.run(port=3978)
Debug
Known issues
breakingVersion 2.0 removed support for Python <3.12. Upgrade Python to 3.12+ or stick to 1.x.
fix
Ensure Python 3.12, 3.13, or 3.14 is used. Use `python --version` to verify.
affects: >=2.0.0
breakingImport paths changed in v2.0: `teams.app.TeamsBot` replaces old `microsoft_teams_apps` top-level imports.
fix
Update imports: `from teams.app import TeamsBot` instead of `from microsoft_teams_apps import TeamsBot`.
affects: >=2.0.0
deprecated`TeamsBot` constructor argument `config` deprecated in favor of separate parameters (`bot_id`, `bot_password`).
fix
Pass `bot_id=...` and `bot_password=...` directly instead of a config object.
affects: >=2.0.0
gotchaThe `run()` method uses port 3978 by default, which may conflict with multiple bots. Port must be unique per process.
fix
Specify a different port via `app.run(port=...` or set `PORT` env var.
affects: all
gotchaOAuth authentication requires `Auth` class from `teams.auth`, not directly from BotBuilder.
fix
Use `from teams.auth import Auth` and follow the OAuth flow in official samples.
affects: >=2.0.0
Upgrade
Version history
2.0.12latest on PyPI · released May 27, 2026
Audit
Dependencies
botbuilder-corerequiredCore bot framework used internally by Teams apps
aiohttprequiredAsync HTTP client/server for bot runtime
msalrequiredMicrosoft Authentication Library for token handling
Agent activity
2 hits · last 30 days
node
2
Resources

No resource links recorded.

microsoft-teams-apps — pip install microsoft-teams-apps · libregistry