Botbuilder-dotnet: IBotFrameworkHttpAdapter should handle AppCredentials

Created on 17 Apr 2020  路  2Comments  路  Source: microsoft/botbuilder-dotnet

Is your feature request related to a problem? Please describe.
Currently we are unable to use the BotFrameworkHttpAdapter with AAD certificate authentication.

In release 4.5.3 support for using AppCredentials and decoupling password based authentication was introduced. However it does look like the BotFrameworkHttpAdapter never got updated with this.

Describe the solution you'd like
Have a way to use a certificate instead of a password when using the BotFrameworkHttpAdapter

[enhancement]

Most helpful comment

Hi @timotheeguerin

It is currently possible to use CertificateAppCredentials, by overriding BuildCredentialsAsync of BotFrameworkHttpAdapter:

public class AdapterWithErrorHandler : BotFrameworkHttpAdapter
    {
        protected override Task<AppCredentials> BuildCredentialsAsync(string appId, string oAuthScope = null)
        {
            return new CertificateAppCredentials(...);
        }
    ...
    }

We have an issue tracking an update to improve this: https://github.com/microsoft/botbuilder-dotnet/issues/3490 Please add any suggestions to that issue.

All 2 comments

Hi @timotheeguerin

It is currently possible to use CertificateAppCredentials, by overriding BuildCredentialsAsync of BotFrameworkHttpAdapter:

public class AdapterWithErrorHandler : BotFrameworkHttpAdapter
    {
        protected override Task<AppCredentials> BuildCredentialsAsync(string appId, string oAuthScope = null)
        {
            return new CertificateAppCredentials(...);
        }
    ...
    }

We have an issue tracking an update to improve this: https://github.com/microsoft/botbuilder-dotnet/issues/3490 Please add any suggestions to that issue.

Thanks Eric, that seems to do the trick.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ivorb picture ivorb  路  6Comments

markbeau picture markbeau  路  6Comments

lauren-mills picture lauren-mills  路  6Comments

cmayomsft picture cmayomsft  路  6Comments

EricDahlvang picture EricDahlvang  路  4Comments