Skip to content

Add SERVICE_URL to override default service_url for Teams#247

Merged
heyitsaamir merged 1 commit into
mainfrom
aamirj/addServiceUrl
Jan 26, 2026
Merged

Add SERVICE_URL to override default service_url for Teams#247
heyitsaamir merged 1 commit into
mainfrom
aamirj/addServiceUrl

Conversation

@heyitsaamir

Copy link
Copy Markdown
Collaborator

Similar to microsoft/teams.ts#435. Need a way to override base URLs for the Teams backend.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for customizing the Teams backend service URL through a SERVICE_URL environment variable and service_url configuration option, similar to the TypeScript SDK (teams.ts PR #435). This enables users to override the default service URL (https://smba.trafficmanager.net/teams) for regional deployments or testing scenarios.

Changes:

  • Added service_url option to AppOptions and InternalAppOptions for configuration flexibility
  • Implemented environment variable fallback with precedence: options > env > default
  • Added comprehensive test coverage for all configuration scenarios

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/apps/src/microsoft_teams/apps/options.py Added service_url field to AppOptions TypedDict and InternalAppOptions dataclass with documentation
packages/apps/src/microsoft_teams/apps/app.py Implemented service URL resolution with rstrip("/") normalization and integrated with ApiClient initialization
packages/apps/tests/test_app.py Added comprehensive test suite covering default, environment variable, options, and precedence scenarios

Comment thread packages/apps/tests/test_app.py
@heyitsaamir
heyitsaamir merged commit 8f48a01 into main Jan 26, 2026
12 checks passed
@heyitsaamir
heyitsaamir deleted the aamirj/addServiceUrl branch January 26, 2026 18:28
This was referenced Jan 27, 2026
heyitsaamir added a commit that referenced this pull request Jan 28, 2026
# Release version 2.0.0a9

Commits since v2.0.0a8:
  - Add support for Python 3.14 (#259)
  - Bump qs from 6.14.0 to 6.14.1 in /examples/tab/Web (#240)
  - Bump urllib3 from 2.5.0 to 2.6.3 (#251)
  - Bump authlib from 1.6.5 to 1.6.6 (#252)
  - Bump starlette from 0.48.0 to 0.49.1 (#261)
  - Bump fastmcp from 2.12.4 to 2.14.0 (#260)
  - Bump python-multipart from 0.0.20 to 0.0.22 (#254)
  - Bump virtualenv from 20.35.3 to 20.36.1 (#256)
  - Bump pyasn1 from 0.6.1 to 0.6.2 (#255)
  - Bump azure-core from 1.36.0 to 1.38.0 (#257)
  - Bump aiohttp from 3.13.0 to 3.13.3 (#258)
- fix meetingStart and meetingEnd casing bug & add meetings sample
(#246)
  - Remove jitter during streaming (#248)
  - Add SERVICE_URL to override default service_url for Teams (#247)
- [Fix] streaming: do not reset timeout for each emit, do not wait
forever on close stream (#197)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants