Microsoft Teams Bot - Writing to a bot returns error message - botframework

I've created a bot based on the following sample:
https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/typescript_nodejs/57.teams-conversation-bot
Everything looks well so far and worked in my first bot. But with my second bot I've created when I start a conversation with the bot, I get a "Failed to send" error in Microsoft Teams on my desktop.
When I use teams in the web I can see in the dev tools the following error message for the request:
https://emea.ng.msg.teams.microsoft.com/v1/threads
Error:
One or more of the user ids provided are not valid.
I'm lost on what could be wrong. Any hint would be highly appreciated.

I was seeing the same error after creating a second bot for testing and realized I had forgotten to setup the Teams channel in Azure configuration.
So double-check that the Microsoft Teams channel is running:

Related

Skype bot cannot send messages to some group from special day although it works fine before

We have implement a Skype bot using Bot Builder 4. And this bot run smoothly around 2 years. But from recent days some specify groups cannot receive proactive message from the bot. We have traced both production & development environment to narrow down issue as below:
Those group cannot receive message all have format as: ...#p2p.thread.skype. When we create new group and add this bot into group (new group have format: ...#thread.skype). The message send successfully to new group.
We have get source code Bot Builder 4 from Github and add to my project to debug and see below:
This is group send fail:
fail group
This is group send sucessfull:
sucess group
We got meaningless warning from my azure portal:
azure warning
I don't know if Skype bot has just changed any rules or restrictions about their service?
I am very pleased and appreciate any sharing from everyone.
This issue is a bug from Skype backend service. The MS team has just confirmed on this github:
This is a confirmed bug on Skype backend side. The issue has been
mitigated for the specific bot and the general fix will be rolled out
on the first week of January.
https://github.com/microsoft/BotFramework-Services/issues/270#issuecomment-752455967

microsoft bot framework - skype for business - error

I am using Microsoft Botframework to publish a bot (Channel Registration). When I try enabling the channels , I see the bot to be working in Slack , Skype, MS Teams & Web chat . However (despite following the steps to enable bot in SFB) I could not get the bot working in Skype for Business. I keep getting the error.
"Sorry, we ran into a problem at our end."
Neither do I see any log to debug.
Waited more than 24 hrs to ensure it is not the sync issue. But issue still remains. Any help appreciated !!
I am not clear with the error as to from which end it is being thrown.
I need you to follow the below steps:
Publish Bot in azure as an app service, through VS if you are coding through c#.
Create a "Bot channel registration" in azure and connect the above app service and Bot channel registration(simple use the URL of the app service append it with /api/messages and insert the same as messaging endpoint in Bot channel registration).
use the app id and app secret in bot solution and republish the app service.
Inside Bot channel registration click on channel and enable it for Skype for business(you will find your BOT in SFB using the credentials you have used to create the bot channel registration).
Finally got it working. What i noticed is the following
I faced the issue when I used the SIP URI as somebot#mydomain.com to register the bot in my tenant.
And i got it working when I used the SIP URI as somebot#mydomain.onmicrosoft.com.
Unsure on the reasoning though :)
And btw thanks #Tanmoy for your answer aswell !!

Microsoft botframework bot stopped working in Microsoft team

I tried to connect a bot built using Microsoft botframework to Microsoft team with no luck.
If I use other channels like webchat it works like a charm ! , I've tried to create new simple bot using Azure Bot services. In a matter of fact, I left the generated echo bot code as is , when I tried to connect to Teams channel I got an error message "Oops something went wrong" as you can see in this screen capture
Bot Service Azure Error
tried to use the Microsoft ID and add the bot to MS teams app package however the same behavior applies (bot is never responding)
if the bot is running locally using ngrok there is no message been logged to ngrok endpoint at all as if msteams client is not sending the conversation at all.
I suspect there is a problem with bot registration.
P.S. Skype channel is not working as well.
Thanks,
Amr

Bot framework Unable to use with Skype For Business

I've built a Bot using C#. I tested it using the emulator, web chat, direct line and Skype, and it's working as expected.
I followed the steps to register the bot with skype for business, I waited more than 24 hours to see what's happen.
So far, I can see the Bot as a contact, however, when I try to send a message, the error
"Error happened in Skype for business when reaching bot service. We
saved this conversation. You'll see it soon in the Conversations tab
in Skype for Business and in the Conversation History folder in
Outlook."
Looking for some logs or something, I collected some info, that I'm sharing here.
Analytics from BOT that proves that it's reaching it:
The Log for SFB channel said: "There was an error sending this message to your bot: HTTP status code NotFound"
It's look that the Bot endpoint is not available. When I registered it in SFB, I've been using NGROK (to run agains my machine), but later I've change it to a azure site.
"Old" endpoint is used yet today:
So, all I can guess is that Bot End Point was "registered" at the moment that I made the registration of my Bot in SFB, and now it's not possible to change it.
Does it make sense to anyone of you?
My problem seems to be kind of similar to Bot Framework - An error while sending a message from Skype for Business
Adrián
Ok, I'm sure the problem with the bot was the endpoint registration. I found a powershell script that update the endpoint.
I Opened Windows PowerShell as Administrator and run the ff scripts:
Import-PSSession (New-CsOnlineSession -Credential (Get-Credential))
Set-CsOnlineApplicationEndpoint -Uri sip:username#yourdomain.com
Obviously, I changed username#yourdomain.com with my own.
Then, after waiting 8 hours (or so), I was able to communicate with the bot, using SFB as channel.
Bot running as expected
I hope this can be useful for others.

Bot Service Basic Bot not responding to prompts

I've a Basic Bot Template based Bot set up using Bot Service. I've built a use case with few question prompts and capturing answers. I see the timestamp below my prompt in the chat box indicating that my prompt is delivered. But don't get a response back from the service. The application is still in develop and still haven't published it.
On Channels -> Web Chat -> I see few errors being logged.
Error: "There was an error sending this message to your bot: HTTP status code NotFound".
Could anybody help resolving this error?
A 404 (Not Found) would imply there's something wrong with your bot's registration in the bot framework portal. Can you log into dev.botframework.com, open your bot, hit edit, and see what the endpoint URL looks like?

Resources