Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Allow passing custom Bot #2130

Open
stepro opened this issue Oct 21, 2024 · 3 comments · May be fixed by #2166
Open

[Feature Request]: Allow passing custom Bot #2130

stepro opened this issue Oct 21, 2024 · 3 comments · May be fixed by #2166
Assignees
Labels
enhancement New feature or request .NET Pull requests that update .net code P0

Comments

@stepro
Copy link
Member

stepro commented Oct 21, 2024

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!

@stepro stepro added the enhancement New feature or request label Oct 21, 2024
@singhk97 singhk97 self-assigned this Oct 29, 2024
@singhk97 singhk97 added .NET Pull requests that update .net code P0 labels Oct 29, 2024
@singhk97
Copy link
Collaborator

Thanks for the feature request! The second solution seems viable to me, we'll add it to our backlog but don't have a timeline for this.

Would you like to open a PR?

@stepro
Copy link
Member Author

stepro commented Nov 4, 2024

Sure, I'll give it a shot!

@stepro
Copy link
Member Author

stepro commented Nov 5, 2024

Sure, I'll give it a shot!

Like this: #2166

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request .NET Pull requests that update .net code P0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants