Getting onTurnError using the sample teams bot auth from github

%3CLINGO-SUB%20id%3D%22lingo-sub-3333221%22%20slang%3D%22en-US%22%3EGetting%20onTurnError%20using%20the%20sample%20teams%20bot%20auth%20from%20github%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3333221%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20I've%20been%20trying%20to%20make%20the%20sample%20bot%20authentication%20app%20provided%20in%20the%20following%20github%20repo%20work%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2FBotBuilder-Samples%2Ftree%2Fmain%2Fsamples%2Fjavascript_nodejs%2F46.teams-auth%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EBotBuilder-Samples%2Fsamples%2Fjavascript_nodejs%2F46.teams-auth%20at%20main%20%C2%B7%20microsoft%2FBotBuilder-Samples%20%C2%B7%20GitHub%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20followed%20all%20the%20steps%20indicated%20but%20I%20just%20can't%20make%20it%20work%20properly.%20I%20have%20been%20getting%20an%20onTurnError%20every%20time%20I%20try%20to%20send%20a%20message%20to%20the%20bot.%20Here's%20the%20error%20in%20the%20terminal%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22puri18_0-1651844925627.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F369832i8C7A3BB9EFE4803D%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22puri18_0-1651844925627.png%22%20alt%3D%22puri18_0-1651844925627.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EHere's%20what%20the%20bot%20sends%20me%20in%20in%20teams%20chat%20when%20I%20receive%20this%20error%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22puri18_2-1651845046256.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F369834i1301A6E52F5D8A13%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22puri18_2-1651845046256.png%22%20alt%3D%22puri18_2-1651845046256.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20assume%20that%20if%20this%20works%20properly%20and%20I%20type%20anything%2C%20it%20should%20show%20the%20prompt%20to%20sign%20in%20but%20it%20never%20does.%3C%2FP%3E%3CP%3EThe%20logout%20dialog%20seems%20to%20work%20when%20i%20send%20%22logout%22%20though.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22puri18_3-1651845099526.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F369835i0FC2C782430EA77B%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22puri18_3-1651845099526.png%22%20alt%3D%22puri18_3-1651845099526.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20running%20this%20with%20ngrok%20and%20have%20put%20the%20ngrok%20url%20in%20the%20messaging%20endpoint%20of%20my%20bot%20like%20this%3A%3CBR%20%2F%3E%3CNGROK_URL%3E%2Fapi%2Fmessages%3C%2FNGROK_URL%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20run%20this%20command%20in%20ngrok%3A%26nbsp%3B%3CSPAN%3Engrok%20http%20%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3Ehost%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3Eheader%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3Erewrite%20%3C%2FSPAN%3E%3CSPAN%3E3978%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EPlease%20help.%20I'm%20not%20sure%20what%20to%20do%20anymore.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3333221%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3334811%22%20slang%3D%22en-US%22%3ERe%3A%20Getting%20onTurnError%20using%20the%20sample%20teams%20bot%20auth%20from%20github%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3334811%22%20slang%3D%22en-US%22%3EWe%20are%20checking%20this%20at%20our%20end%2C%20we%20will%20setup%20the%20sample%20locally%20and%20get%20back%20to%20you.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3349774%22%20slang%3D%22en-US%22%3ERe%3A%20Getting%20onTurnError%20using%20the%20sample%20teams%20bot%20auth%20from%20github%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3349774%22%20slang%3D%22en-US%22%3EHi%2C%20any%20updates%20on%20this%3F%20thank%20you%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3350910%22%20slang%3D%22en-US%22%3ERe%3A%20Getting%20onTurnError%20using%20the%20sample%20teams%20bot%20auth%20from%20github%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3350910%22%20slang%3D%22en-US%22%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1376579%22%20target%3D%22_blank%22%3E%40puri18%3C%2FA%3E%20-%20We%20have%20tested%20this%20sample.%20Before%20adding%20OAuth%20Connection%20Settings%20we%20also%20got%20onTurnError.%20But%20after%20adding%20OAuth%20Connection%20Settings%20it%20was%20working%20fine%20at%20our%20end.%3CBR%20%2F%3ECould%20you%20please%20add%20OAuth%20Connection%20Settings%20and%20check%20again.%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi, I've been trying to make the sample bot authentication app provided in the following github repo work:

BotBuilder-Samples/samples/javascript_nodejs/46.teams-auth at main · microsoft/BotBuilder-Samples · ...

 

I have followed all the steps indicated but I just can't make it work properly. I have been getting an onTurnError every time I try to send a message to the bot. Here's the error in the terminal:

puri18_0-1651844925627.png

Here's what the bot sends me in in teams chat when I receive this error:

puri18_2-1651845046256.png

 

I assume that if this works properly and I type anything, it should show the prompt to sign in but it never does.

The logout dialog seems to work when i send "logout" though.

puri18_3-1651845099526.png

 

I am running this with ngrok and have put the ngrok url in the messaging endpoint of my bot like this:
<ngrok_url>/api/messages

 

I run this command in ngrok: ngrok http -host-header=rewrite 3978


Please help. I'm not sure what to do anymore.

 

4 Replies
We are checking this at our end, we will setup the sample locally and get back to you.
Hi, any updates on this? thank you
@puri18 - We have tested this sample. Before adding OAuth Connection Settings we also got onTurnError. But after adding OAuth Connection Settings it was working fine at our end.
Could you please add OAuth Connection Settings and check again.
@puri18 - Could you please confirm if the above suggestion helped you in any way or are you still facing the issue?