botbuilder-community-dotnet icon indicating copy to clipboard operation
botbuilder-community-dotnet copied to clipboard

Operation returned an invalid status code 'Unauthorized' - AzureAd AuthController

Open ppanchal-mobiz opened this issue 1 year ago • 0 comments

After successfully authenticating the user with Bot.Builder.Community.Middleware.AzureAdAuthentication middleware, the AuthController tries to send a proactive message using this line:

connectorClient.Conversations.SendToConversation(proactiveMessage);

The above line is throwing an exception Microsoft.Bot.Schema.ErrorResponseException with message

Operation returned an invalid status code 'Unauthorized'

ppanchal-mobiz avatar Aug 04 '23 21:08 ppanchal-mobiz