microsoft / teams-ai

SDK focused on building AI based applications and extensions for Microsoft Teams and other Bot Framework channels
MIT License
407 stars 176 forks source link

[Dev support]: What is the OAUTH_CONNECTION_NAME #1801

Closed asith-w closed 2 months ago

asith-w commented 3 months ago

Question

In the OAuth bot sample project settings file, there is a property named OAUTH_CONNECTION_NAME. I am wondering where this value comes from and where you can find it. can it find from the Azure AD app registration? OAUTH_CONNECTION_NAME

[samples](https://github.com/microsoft/teams-ai/blob/main/dotnet/samples/06.auth.oauth.bot/appsettings.Development.json

Code snippets)

 AuthenticationOptions<AppState> options = new();
options.AddAuthentication("graph", new OAuthSettings()
    {
        ConnectionName = config.OAUTH_CONNECTION_NAME,
        Title = "Sign In",
        Text = "Please sign in to use the bot.",
    }
);
singhk97 commented 2 months ago

It is part of the Azure bot resource. The OAuth connection defines the OAuth settings used by the bot and can be configured in the Azure bot resource.

https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/authentication/bot-sso-register-aad?tabs=windows#to-update-oauth-connection-for-your-bot-resource