Describe the issue
The Teams SDK currently uses hardcoded URLs for BotFramework token exchange.
For example here:
|
var req = HttpRequest.Get($"https://token.botframework.com/api/usertoken/GetToken?{query}"); |
This makes it impossible to use other endpoints e.g. the european endpoints which are documented here: https://learn.microsoft.com/en-us/azure/bot-service/ref-oauth-redirect-urls?view=azure-bot-service-4.0
As a result, it is not possible for the bot backend to obtain a user token from botframework because the request is failing.
Expected behavior
The SDK should allow consumers to configure or override default endpoint URLs via:
- Environment variables
or
- Configuration options during initialization
or
- A documented override mechanism
Actual behavior
The URLs are currently hardcoded to https://token.botframework.com and cannot be changed without modifying the SDK source.
Suggested fix
Introduce configuration options to override default endpoint URLs. For example:
BOTFRAMEWORK_BASE_URL=https://europe.token.botframework.com
Describe the issue
The Teams SDK currently uses hardcoded URLs for BotFramework token exchange.
For example here:
teams.net/Libraries/Microsoft.Teams.Api/Clients/UserTokenClient.cs
Line 41 in 12758cc
This makes it impossible to use other endpoints e.g. the european endpoints which are documented here: https://learn.microsoft.com/en-us/azure/bot-service/ref-oauth-redirect-urls?view=azure-bot-service-4.0
As a result, it is not possible for the bot backend to obtain a user token from botframework because the request is failing.
Expected behavior
The SDK should allow consumers to configure or override default endpoint URLs via:
or
or
Actual behavior
The URLs are currently hardcoded to https://token.botframework.com and cannot be changed without modifying the SDK source.
Suggested fix
Introduce configuration options to override default endpoint URLs. For example: