Can you use Botkit and botframework on azure webchat and skype? - node.js

I've set up a starterkit on studio.botkit.ai for Microsoft Teams. The bot is hosted on glitch. In Azure bot registration I've included the endpoint provided by glitch. Ive also added my id and password from azure bot registration to my bot.
When I try and test out the bot in azure web chat I sends an error that reads
"There was an error sending this message to your bot: HTTP status code NotFound"
It this possible?

Check to make sure the messaging endpoint URL configured in Azure matches your Glitch url for Botkit, which will include "/receive/teams"

Related

401 unauthorized error when registered a MS Teams bot using Azure Bot

I used "Teams Toolkit [Preview]" in VS2019 to develop a MS Teams bot. If I registered my bot via https://dev.botframework.com/bots/new, I can test that from MS Teams UI without problems. however when I registered the bot from Azure Bot service by using a existing Azure AD application which I created separately, I see "401 unauthorized" error message shown up in my ngrok screen and MS Team bot didn't work. Previously I used "Bot Channel registration" from Azure, it worked fine. As "Azure Bot" replaced "Bot Channel Registration" and "Azure Web Bot", I am trying to figure out why "Azure Bot" didn't work. Can anyone share a latest instruction how to use Azure Bot to create a MS Team Bot?
The steps to create a teams bot is essentially the same, it's just that Bot Framework Registration has been replaced by Azure Bot. The Azure Bot resource should still have all of the same Configuration and Channel registration options available.
You might find the Teams conversation bot sample helpful. Just remember that on step 4, you'll create an Azure Bot resource instead of a Bot Framework Registration resource.
You might also check for common pitfalls, such as forgetting to add /api/messages in the configuration in Azure, pointing ngrok to the wrong port, or typos of appId or other credentials in the bot settings or Teams manifest. These easy to do mistakes can usually cause those errors.

Azure Bot deployed but not working error as Invalid AppId passed on token

I have created Azure App service, Bot Channels Registration, Resource group in Azure Portal and also have a LUIS app created.
I have a custom nodejs code that works perfectly in local using bot emulator.
However, when I upload it to the azure using git it is not working, getting error as "Error: Unauthorized. Invalid AppId passed on token:" in bot emulator, it is neither working in test in webchat getting error as "There was an error sending this message to your bot"
It seems like Appid and Password used in the code are just fine.
I have taken appid and pwd from configuration of my App service.
Message endpoint taken from settings of my Bot channels Registration
Are there any other things to be created for my BOT to work.
Kindly suggest
This is resolved after clearing the credentials in my systems credential manager :-)

Azure bot interacting with authenticated messaging endpoint

I am developing an Azure bot for Microsoft teams, using Azure Bot Service, Bot registration channel setup. The messaging endpoint is an App Service that is authenticated with AAD login. Could some please help me understand how to call this authenticated endpoint from a bot? currently, I am testing it on Webchat and I get a 401 unauthorized error. I tried configuring the Oauth Setting in the bot as per this, but still getting 401.
Could someone please point to any concepts and documentation required here.
There is no need to enable the App service Authentication. Just follow this article to add authentication to your bot via Azure Bot service. Then logon is required when you use the bot.
Reference:
Azure AD integration with Bot Framework / teams
Microsoft Teams behaves somewhat differently than other channels in regards to OAuth and requires a few changes to properly implement authentication. Specifically an Invoke Activity is sent to the bot rather than the Event Activity used by other channels. This Invoke Activity must be forwarded to the dialog if the OAuthPrompt is being used. This is done by subclassing the TeamsActivityHandler and implementing handleTeamsSigninVerifyState. It is best advised to make use of the 46.teams-auth sample to set up OAuth in Teams.
Hope this helps.

Bot works perfect in emulator but fails when deployed in test in webchat Send failed retry error

I have a C# echo bot developed in Visual Studio as per Azure documentation which runs successfully on a bot emulator in desktop. This bot was deployed to Azure and it wouldn't work in web chat or in the "Test in Web Chat" window in Azure portal. It always replies with - couldn't send retry. Could someone please help me out?
This post There was an error sending this message to your bot - Test in Web Chat suggested to check the Messaging endpoint specified and make sure it is same as your using in the bot emulator.
However messaging endpoint in Azure is like https://webappname123.azurewebsites.net/api/messages but in emulator endpoint is a local host http://localhost:3978/api/messages . How can these two match?
Also when I went into channels issue is like "There was an error sending this message to your bot: HTTP status code NotFound"
Is there any place where I could change endpoint URL?
I followed as it is process mentioned in Azure doc for building and deploying Echo bot
Have you added the correct Microsoft App ID and Microsoft App Password in your appsettings.json ?
Your Azure messaging endpoint in azure configuration should be the publicly accessible endpoint, when you are debugging locally, the emulator can authenticate using those Microsoft App ID and Microsoft App Password to reach your service.
When you deploy your solution your bot also authenticates using those credentials.
So make sure those credentials are correct and that your messaging endpoint "https://xxxxxx.azurewebsites.net/api/messages " is working publicly
When you publish your bot, there will be an option as below :
Select Edit App Service Settings.
Add the following details :
MicrosoftAppId : <xxxxx>
MicrosoftAppPassword : <xxxxx>
Click Apply, Ok.
Make sure you remove the Microsoft App Id and Microsoft App Password from appsettings.json, so that it works in bot emulator as well.
Now Publish the bot. It will work at both places.
Hope this is helpful.

QnAmaker bot Azure AD Authentication not working

I created a QnAmaker bot and i enabled Azure AD authentication to make the bot more secure.
The Azure AD page works, i can enter my credentials and i get redirected to the page where my bot is located.
However, when i send a message, it doesn't arrive.
https://imgur.com/a/60OZzIn
The error message i get is the following:
https://imgur.com/a/ysH8pSL
In the bot logging, i see the following error:
https://imgur.com/a/A1cfQmB
How can this issue be resolved?

Resources