Skip to content

Token endpoints are hardcoded #174

@mauricehennig

Description

@mauricehennig

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions