May 25 2022 08:40 AM
I am having a recurring problem with our Bot in Teams that I am struggling to find a root cause and fix for.
We have a bot that has been developed using the C# Bot Framework SDK Version 4 and .NET Core 3.1 that is installed via Teams. There is an issue that is recurring in our Application Insights that I am struggling to figure out. There are multiple exceptions that happen intermittently with the message "Operation returned an invalid status code 'Forbidden'" or "Operation returned an invalid status code 'NotFound'". The only commonality with all these errors are that they happen in the same area of the code.
The bot we have implemented makes use of a waterfall dialog system to handle the authentication and login for users and handle incoming messages once authenticated. The errors always occur when the bot is trying to move on to the next dialog step after completing the OAuthPrompt step, as shown in the screenshot below.
I have searched to try and find why this is happening or even a solution to this issue and although I have found similar problems and have tried their solutions, they have not been able to fix this error.
Has anyone else had an issue similar to this, or know what the problem could be?
May 26 2022 03:55 AM
Jun 03 2022 04:57 AM
Jun 06 2022 12:54 AM
@Sayali-MSFT Apologies for the delayed response, I was on vacation for the last week. I'm not sure what the repro steps are for this issue as it happens intermittently and looking at the telemetry there doesn't seem to be any common ground or any cases where it happens 100% of the time.
I've included the area of code where I think the error originates from below. Like I mentioned in my original post, we are using the WaterfallDialog approach with this bot and this is one of the steps, the error seems to be thrown when moving away from this step to the next.
private async Task<DialogTurnResult> PromptStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken)
{
try
{
UserProfile Profile = await this._stateAccessor.GetAsync(stepContext.Context, () => new UserProfile());
if (String.IsNullOrWhiteSpace(stepContext.Context.Activity.Text))
{
if (!String.IsNullOrWhiteSpace(Profile.CachedMessage))
{
stepContext.Context.Activity.Text = Profile.CachedMessage;
Profile.CachedMessage = String.Empty;
}
}
return await stepContext.BeginDialogAsync(nameof(OAuthPrompt), null, cancellationToken);
}
catch (Exception exc)
{
Dictionary<String, String> Properties = new Dictionary<String, String>();
Properties.Add("Class", "MainDialog");
Properties.Add("Method", "PromptStepAsync");
AppInsightsHelper.LogException(exc, Properties, stepContext.Context);
await stepContext.Context.SendActivityAsync(BotResponse.ErrorMessage_GenericErrorResponse);
return await stepContext.EndDialogAsync(cancellationToken: cancellationToken);
}
}
Jun 09 2022 12:57 AM
Jun 10 2022 03:50 AM
Jun 10 2022 04:04 AM
@amatthews-yakchat - On Azure Portal- https://portal.azure.com/#home
You need to check the URL and Bot connection Name also.
Jun 10 2022 04:28 AM
Jun 10 2022 04:59 AM - edited Jun 10 2022 05:00 AM
@amatthews-yakchat -Could you please provide sample which you refer,so that I can guide you proper way?
Jun 10 2022 05:26 AM
Jun 13 2022 05:57 AM
@amatthews-yakchat -You can check here Connection name and URL.
Jun 15 2022 02:18 AM
@Sayali-MSFT I have noticed that we are using 'Azure Active Directory' as the Service Provider on our bot authentication, would updating this to use 'Azure Active Directory v2' help with the issues we are experiencing?
Jun 15 2022 02:42 AM
Jun 24 2022 02:28 AM
@Sayali-MSFT We are still struggling with this issue, but I have some more information that might be helpful. Here are 3 stack traces from our telemetry, the first two are the 'Operation Failed: NotFound' and 'Operation Failed: Forbidden' errors that are occurring in the OAuth prompt step of our bot.
The third is another similar error I managed to find from another area of our code, where we are displaying a proactive message from the bot to the user. Looking at the traces they seem to have similar root causes, with the error originally coming from Microsoft.Bot.Connector.Conversations+<ReplyToActivityWithHttpMessagesAsync>
'Operation Failed: Forbidden' Trace 1
Microsoft.Bot.Schema.ErrorResponseException:
at Microsoft.Bot.Connector.Conversations+<ReplyToActivityWithHttpMessagesAsync>d__10.MoveNext (Microsoft.Bot.Connector, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Connector.ConversationsExtensions+<ReplyToActivityAsync>d__17.MoveNext (Microsoft.Bot.Connector, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.BotFrameworkAdapter+<SendActivitiesAsync>d__34.MoveNext (Microsoft.Bot.Builder, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.TurnContext+<>c__DisplayClass30_0+<<SendActivitiesAsync>g__SendActivitiesThroughAdapter|1>d.MoveNext (Microsoft.Bot.Builder, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.TurnContext+<SendActivityAsync>d__29.MoveNext (Microsoft.Bot.Builder, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.TurnContext+<SendActivityAsync>d__28.MoveNext (Microsoft.Bot.Builder, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at YakBotService.Dialogs.MainDialog+<PromptStepAsync>d__8.MoveNext (YakBotService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: C:\Dev\YakBot_Old_New\Dialogs\MainDialog.cs:140)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.Dialogs.WaterfallDialog+<OnStepAsync>d__11.MoveNext (Microsoft.Bot.Builder.Dialogs, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.Dialogs.WaterfallDialog+<RunStepAsync>d__12.MoveNext (Microsoft.Bot.Builder.Dialogs, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.Dialogs.WaterfallDialog+<ResumeDialogAsync>d__9.MoveNext (Microsoft.Bot.Builder.Dialogs, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.Dialogs.WaterfallStepContext+<NextAsync>d__18.MoveNext (Microsoft.Bot.Builder.Dialogs, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at YakBotService.Dialogs.MainDialog+<AdminConsentStepAsync>d__7.MoveNext (YakBotService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: C:\Dev\YakBot_Old_New\Dialogs\MainDialog.cs:108)
'Operation Failed: NotFound' Trace
Microsoft.Bot.Schema.ErrorResponseException:
at Microsoft.Bot.Connector.Conversations+<ReplyToActivityWithHttpMessagesAsync>d__10.MoveNext (Microsoft.Bot.Connector, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Connector.ConversationsExtensions+<ReplyToActivityAsync>d__17.MoveNext (Microsoft.Bot.Connector, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.BotFrameworkAdapter+<SendActivitiesAsync>d__34.MoveNext (Microsoft.Bot.Builder, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.TurnContext+<>c__DisplayClass30_0+<<SendActivitiesAsync>g__SendActivitiesThroughAdapter|1>d.MoveNext (Microsoft.Bot.Builder, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.TurnContext+<SendActivityAsync>d__29.MoveNext (Microsoft.Bot.Builder, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.TurnContext+<SendActivityAsync>d__28.MoveNext (Microsoft.Bot.Builder, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at YakBotService.Dialogs.MainDialog+<PromptStepAsync>d__8.MoveNext (YakBotService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: C:\Dev\YakBot_Old_New\Dialogs\MainDialog.cs:140)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.Dialogs.WaterfallDialog+<OnStepAsync>d__11.MoveNext (Microsoft.Bot.Builder.Dialogs, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.Dialogs.WaterfallDialog+<RunStepAsync>d__12.MoveNext (Microsoft.Bot.Builder.Dialogs, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.Dialogs.WaterfallDialog+<ResumeDialogAsync>d__9.MoveNext (Microsoft.Bot.Builder.Dialogs, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.Dialogs.WaterfallStepContext+<NextAsync>d__18.MoveNext (Microsoft.Bot.Builder.Dialogs, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at YakBotService.Dialogs.MainDialog+<AdminConsentStepAsync>d__7.MoveNext (YakBotService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: C:\Dev\YakBot_Old_New\Dialogs\MainDialog.cs:108)
'Operation Failed: Forbidden' Trace 2
Microsoft.Bot.Schema.ErrorResponseException:
at Microsoft.Bot.Connector.Conversations+<ReplyToActivityWithHttpMessagesAsync>d__10.MoveNext (Microsoft.Bot.Connector, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Connector.ConversationsExtensions+<ReplyToActivityAsync>d__17.MoveNext (Microsoft.Bot.Connector, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.BotFrameworkAdapter+<SendActivitiesAsync>d__34.MoveNext (Microsoft.Bot.Builder, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.TurnContext+<>c__DisplayClass30_0+<<SendActivitiesAsync>g__SendActivitiesThroughAdapter|1>d.MoveNext (Microsoft.Bot.Builder, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.TurnContext+<SendActivityAsync>d__29.MoveNext (Microsoft.Bot.Builder, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.TurnContext+<SendActivityAsync>d__28.MoveNext (Microsoft.Bot.Builder, Version=4.11.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at YakBotService.Dialogs.MainDialog+<PromptStepAsync>d__8.MoveNext (YakBotService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: C:\Dev\YakBot_Old_New\Dialogs\MainDialog.cs:140)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.Dialogs.WaterfallDialog+<OnStepAsync>d__11.MoveNext (Microsoft.Bot.Builder.Dialogs, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.Dialogs.WaterfallDialog+<RunStepAsync>d__12.MoveNext (Microsoft.Bot.Builder.Dialogs, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.Dialogs.WaterfallDialog+<ResumeDialogAsync>d__9.MoveNext (Microsoft.Bot.Builder.Dialogs, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Bot.Builder.Dialogs.WaterfallStepContext+<NextAsync>d__18.MoveNext (Microsoft.Bot.Builder.Dialogs, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at YakBotService.Dialogs.MainDialog+<AdminConsentStepAsync>d__7.MoveNext (YakBotService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: C:\Dev\YakBot_Old_New\Dialogs\MainDialog.cs:108)
Hopefully this new information is useful. We are still using the AAD V1 OAuth Service Provider for now, but we can update this if you think it will help solve this issue?
Jul 13 2022 04:39 AM
Jul 13 2022 04:54 AM
Jul 20 2022 07:48 AM
Aug 02 2022 02:22 AM
Aug 02 2022 11:51 PM - edited Aug 02 2022 11:52 PM
According to the above error log, this error response occurs when it returns the invalid status code.
ErrorResponseException-Thrown when the operation returned an invalid status code.
Ref Doc-Conversations.ReplyToActivityWithHttpMessagesAsync Method (Microsoft.Bot.Connector) | Microsoft Docs
Aug 04 2022 06:13 AM