Skip to content

[Feature Request]: Allow passing custom Bot #2130

@stepro

Description

@stepro

Scenario

Please look at this code:

https://github.com/microsoft/teams-ai/blob/main/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/Application/TeamsAdapter.cs#L48

It restricts the means for authentication to using the configuration-based approach only in two ways:

a) it doesn't expose an equivalent to the CloudAdapter constructor that accepts a custom BotFrameworkAuthentication instance.
b) it hardcodes usage of ConfigurationServiceClientCredentialFactory.

This makes it impossible to use Teams.AI when the underlying bot framework configuration is using federated credentials, which is currently pending a configuration-based implementation (see microsoft/botbuilder-dotnet#6838).

Solution

One or both of the following:

  • The bot framework implements the configuration-based approach for federated credentials (I've suggested an extension of this PR here).
  • The Teams.AI library allows passing a custom BotFrameworkAuthentication instance to TeamsAdapter.

Just the first approach will work as an immediate solution and may be the easier of the two, but the second approach seems like it should be supported in general to enable more flexibility around authentication.

Additional Context

Thanks in advance for considering!

Metadata

Metadata

Assignees

Labels

.NETPull requests that update .net codeP0enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions