Closed tracyboehrer closed 6 months ago
Complication here is that CloudAdapter and BotFrameworkHttpAdapter ProcessActivity catch that exception and just return a 401 in the response.
@gandiddi Hold on this a bit
@gandiddi Closing. CloudAdapter already was logging this. I resolved it in the older adapter.
Specific example: MicrosoftAppId is not the correct AppId for the incoming request. This results in a 401, but is tedious to debug. Mostly likely place is in CloudAdapter.ProcessAcitivtyAsync. Wrap body in UnauthorizedAccessException exception handler, log exception, rethrow. There are multiple ProcessActivityAsync methods, so check each.
Scenario: Provide an incorrect AppId in appsettings and communicate with the bot.
Log the exception message as an error.