Microsoft Teams Bot not receiving messages - botframework

We have created a Bot through the Teams Dev Portal (https://dev.teams.microsoft.com/) and attached it to a Teams Tab app, but the bot is not receiving any messages from the Bot Framework. The Tab app was also created using the Teams Dev Portal and published to the Org app store. The same bot works fine if we test it on Bot Framework Portal (https://dev.botframework.com/). The bot is a http service hosted on AWS and registered in Azure AD.
We have a couple of other virtually identical bots created a few months ago that continue to work fine. Newly created bots seem to have this issue.

You need to configure the channel in azure Bot and add the app service.
please refer this link for further query.
https://www.sharepointeurope.com/step-by-step-configure-bot-to-work-in-teams-and-with-microsoft-graph/

Related

Teams channel in Azure Bot Service not working

I created an Azure Bot Service. When I test the service using "Test in Web Chat" it works as expected. When I add the Web Chat channel and use the Web Chat URL, it works as expected.
However, when I add the Microsoft Teams channel, it does not work as I expected. The Health Status shows "Healthy" (in "Channels (Preview)") and "Running" (in "Channels"). When I select "Open in Teams", I am redirected to Teams, but I do not see the bot as a user/bot I can chat with. I watched a video showing just that behavior as I was expecting, but the link only opens my Teams. I only have one other user in Teams and that user shows up. No sign of the bot. What am I missing?
I tried using the "Get bot embed codes". I put in the URL for the Mstreams href and instead of sending me to the bot user as I expected, I am redirected to the other user on the account (not the bot). What am I missing?
I've tried this using the "Channels" and the "Channels (Preview)" sections with the same results.
If relevant, I am still in the trial period with Azure and have not upgraded, but nothing says this should be an issue.
From all I can tell, I'm logging into the Azure portal and the Bot Framework portal with the same account as my Teams account. I'm using latest updated version of Chrome.
I don't think free account has anything to do with this. But the fact that the " bot embed codes" lead you to a different user, may be a configuration issue. Read Create a bot and Test and debug your Microsoft Teams bot in the Microsoft Teams documents for more information.
If you have successfully deployed to teams channel (teams channel registration), as per docs Copy the https part of the code that is shown in the Get bot embed code dialog.
For example, https://teams.microsoft.com/l/chat/0/0?users=28:b8a22302e-9303-4e54-b348-343232
In the browser, paste this address and then choose the Microsoft Teams app (client or web) that you use to add the bot to Teams. You should be able to see the bot listed as a contact that you can send messages to and receives messages from in Microsoft Teams.
Alternately, In-order to test them in teams you need to take the app id from the Configuration page of the bot.
Once you search with the app ID in teams you would be able to see this bot as a contact in Microsoft Teams.
Refer:
Create a Teams app package and upload your app to the Teams client for testing. Learn how
Publish your bot as a Line of Business app in your organization's Teams Tenant App Catalog. Learn how
Publish your bot as an app in the Teams App store. Learn how
I think I have found the answer, though I'm still trying to retrace my steps to make sure this is accurate. I will update here if I find anything more of value.
Despite little/no documentation to this effect, bots apparently do not work in the free version of Teams. You have to at least:
create a developer version of Microsoft O365 (E5 license) (and go through all the rigamarole to get it setup properly)
add at least one more user to the organization
then open Teams
Then, I used the embed URL to get the bot to show up. (Again, the same process did not work with my free Teams account even with another user added to it).
For the record, I didn't need to change any admin settings once the three items above were completed.

Chat Bot is not working - HTTPS internal server error

I have created a sample Echo bot for testing i've followed the given instructions in the MS tutorial site.
Created a web app service
Downloaded the MS bot framework v4 SDK - Echo Bot
Got the Publishing profile
Published the bot using visual studio
tested the chat bot When i test my bot in Test in Web Chat option in bot channels registration.
before that i tested in bot framework emulator, it was working fine as expected.
I checked the microsoft appid and password, it is all fine.
what am i missing to look on. can anyone please guide me.
Finally I've found the issue, though it a minor mistake. I wanted to update it here since many new Azure Bot users might do this mistake like me.
It was due to the option which i selected in while doing the app registration, After selecting the third option for Who can use this application or access this API?
It always good to select Multitenant option to make the bot to work for everyone.
If your requirement is restricted to one particular tenant then you should select the first option. But it is not in my case.
Accounts in any organizational directory (Any Azure AD directory -
Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)

Bot registration vs application registration in Azure

I'm trying to understand the difference between a bot service registration & application registration in Azure.
I'd assumed that a bot registration was all that was required (to get the app id & secret) to test out a bot, but then came across the following guide for setting up a teams app that used a bot which instructs you to also create an application registration that's linked to the bot registration.
What is the application registration for?
If you're developing a consumer / skill bot setup do you need an application registration for all the bots or just the skill consumer?
Thanks in advance.
So technically you require both, but you're correct that doing a normal bot registration in the Azure portal (I say normal because there are other ways than the portal, for instance, like ARM templates, etc.) will create an App Registration as well. You need to go to the app registration to get your app password (also called app secret).
You can choose to go another route, like creating an app registration first, and then using that when you create your bot, and there are reasons why you might like to do that, but if you don't have a specific reason, just go the normal route.
Incidentally, be aware of the difference when creating your bot between a "Bot Channels" registration and a "Web App Bot" - both will give you a bot registered with the Bot serviced, but the "Web App" bot also includes an Azure "Web app" that you can use to host your bot (whereas Bot Channels gives you more freedom in how you want to host your bot, for instance as an Azure Function or even outside of Azure altogether).
Bot service registration refers to registering a bot with the Azure Bot Service (as your bot does not have to be hosted on Azure).
App registration refers your bot security configuration. You set this up when you click on to the "App ID and password" field during setup.
There is some other Azure Bot Service documentation which goes into this in more detail:
Bot channels registration
Troubleshooting Bot Framework authentication
Create a bot with Azure Bot Service

how to add an existing bot to custom microsoft app?

how to add "now virtual agent"(service now bot in microsoft teams) to custom microsoft team. Do I need to register the "now virtual agent" in azure?
To integrate a Virtual agent Bot in Teams App, you need to publish your bot and need to add Microsoft Teams channel to make the Bot reachable to Teams Users. Once the Team channel is successfully added you will get an App ID. Now you can create an App Package for Teams using App Studio, You need to put the App Id for your Bot in bot Configuration. Look at Add Chat bot to Teams documentation

How to connect QnA Service on qnamaker.ai to an azure chatbot using Bot Service?

I’ve created a QnA Service using qnamaker.ai and when I proceed further to create a bot using the Bot Service, I cannot because the upon searching there’s no option like Bot Service (Preview) as mentioned in the tutorials. Instead I’m presented with the following:
• Web App Bot
• Functions Bot
• Bot Channels Registration
On Azure, there are 3 services related to Bot:
Web App Bot
Functions Bot
Bot Channels Registration
Web App Bot and Function Bot are both part of Bot Service:
Bot Service provides the core components for creating bots, including
the Bot Builder SDK for developing bots and the Bot Framework for
connecting bots to channels.
Simply put, Bot Service will host a Web App / Functions Bot in Azure and let you config channels or edit the code online.
Bot Channels Registration is for projects where the developer creates their own web app project based on Bot Builder SDK and deploy the web app to Azure/AWS/Google Cloud Platform. In Azure's Bot Channels Registration, the developer can link their web app's url to Azure and enable channels to communicate to their bot. In summary, this scenario enable more flexiblity in development and hosting.
In your case, you can create a Web App / Functions Bot use QnA Bot template. Once created, in Application Settings > under App settings > Find QnAKnowledgebaseId & QnASubscriptionKey,
replace the two fields from the information in QnA service.
Save the update and your Bot should use the QnA service you published.

Resources