{"id":27961,"library":"microsoft-teams-common","title":"Microsoft Teams Common Library","description":"Common package for building Microsoft Teams bots and apps in Python. Provides shared models, utilities, and middleware. Current stable version is 2.0.0, released June 2025. The library is under active development with alpha pre-releases on the v2.0.0 track.","status":"active","version":"2.0.0","language":"python","source_language":"en","source_url":"https://github.com/microsoft/teams.py/tree/main/packages/common/src/microsoft_teams/common","tags":["teams","microsoft","common","bot-framework"],"install":[{"cmd":"pip install microsoft-teams-common","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Old namespace `microsoft.teams.*` is deprecated since alpha v2.0.0a8; use underscore `microsoft_teams.*`.","wrong":"from microsoft.teams.common import MicrosoftTeamsCommon","symbol":"MicrosoftTeamsCommon","correct":"from microsoft_teams.common import MicrosoftTeamsCommon"}],"quickstart":{"code":"import os\nfrom microsoft_teams.common import MicrosoftTeamsCommon\n\n# Initialize common client with optional configuration\nclient = MicrosoftTeamsCommon(\n    app_id=os.environ.get('TEAMS_APP_ID', ''),\n    app_password=os.environ.get('TEAMS_APP_PASSWORD', ''),\n)\nprint('Common client initialized successfully.')","lang":"python","description":"Basic setup to initialize the common module. Requires TEAMS_APP_ID and TEAMS_APP_PASSWORD environment variables for authentication."},"warnings":[{"fix":"Change all imports from `microsoft.teams.common` to `microsoft_teams.common`.","message":"Namespace changed from `microsoft.teams.*` to `microsoft_teams.*` in v2.0.0a8 and later. Imports using dots will break.","severity":"breaking","affected_versions":">=2.0.0a8"},{"fix":"Replace HttpPlugin with HttpServer and HttpServerAdapter as per migration guide.","message":"In v2.0.0a20, HttpPlugin was replaced with HttpServer + HttpServerAdapter. Old code using HttpPlugin will not work.","severity":"breaking","affected_versions":">=2.0.0a20"},{"fix":"Upgrade to Python 3.12 or later.","message":"Support for Python <3.12 dropped as of v2.0.0. Requires Python >=3.12 and <3.15.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Access IsTargeted via Account object instead of Activity.","message":"IsTargeted property moved from Activity class to Account class in v2.0.0a20.","severity":"breaking","affected_versions":">=2.0.0a20"},{"fix":"Replace custom logger imports with Python's standard logging module.","message":"Remove custom logger, use standard logging library (v2.0.0a20).","severity":"breaking","affected_versions":">=2.0.0a20"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use `from microsoft_teams.common import MicrosoftTeamsCommon`.","cause":"Importing using deprecated dot notation.","error":"ModuleNotFoundError: No module named 'microsoft.teams'"},{"fix":"Use `HttpServer` and `HttpServerAdapter` instead.","cause":"HttpPlugin was removed in v2.0.0a20.","error":"ImportError: cannot import name 'HttpPlugin' from 'microsoft_teams.common'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}