Azure Web Bot Service Reset Messaging EndPoint - azure

When I setup a Bot service on Azure, an end point was automatically setup. I then wanted to debug locally so I used ngrok and copied this URL into the messaging endpoint. Stupidly, I didn't save a copy of the auto generated end point Azure provided. Now I'd like to go back to an Azure auto generated messaging endpoint however I'm unsure how to regenerate one to use. I've been informed that this is likely a security feature and to setup a new bot service again. Do I need to setup a new bot service or is there a way of regenerating a key in azure?

This depends on which type of Bot Service you created on Azure - there are two: Web App Bot and Bot Channels Registration. The latter is basically just a "registration" of a Bot in Azure + Bot Framework Services, and it's -intended- for you to host your bot wherever you like (Azure or otherwise). If you created a "Web App Bot" then it will create an Azure Web app at the same time, and the address will be based on that resource, plus an extra bit (see in a moment). To get the first part, the base address, check for the web app resource in Azure, and find it's regular Azure-generated address (I think it's like https://[whateverBotname].azurewebsites.net/). You should be able to visit that in the browser. Next is the "extra bit", which is simply the endpoint inside the app that the bot itself runs on (basically where the bot POST messages must go). By default its "/api/messages".
So, the full address would be https://[whateverBotname].azurewebsites.net/api/messages.
As an extra tip, if you want to change it again to test with NGrok, just paste the address in the Description field - it'll get Saved when you click the Save button.
As an extra extra tip - you can create the OTHER type of Bot - a "Bot Channels Registration" in Azure, which is JUST the registration, that you can use JUST for local development (you'll basically change the address every few hours, as your NGrok endpoint resets).
Hope that helps,

Related

Inability to deploy the WEB Api using Visual Studio

I have created a web API, and now I want to deploy it. Unfortunately, when I try to publish my web API, I need to sign in or create a new account on the App Service step.problematic step
When I try to log in or even create a new account - it accepts it but doesn't allow me to go further and open the App Service settings like this: enter image description here
In my case, it was because I didn't activate any subscription. But in my opinion, instead of just not allowing me to deploy my WEB API, they could also specify the cause.

Additional Steps to Deploy C# Teams Messaging Extension (Bot) to Azure?

I have used the Bot Builder Teams messaging extension sample and successfully debugged the project locally on my machine using ngrok. I then proceeded to follow the Azure deployment instructions, and successfully deployed my bot project to Azure.
However, I cannot find instructions regarding what values need to change within my project to now use the assets within Azure. I have enabled the Teams channel on the Bot Channel Registration resource that was provisioned, and I tried updating the botId value within my project's manifest file to match that of the newly provisioned app registration. But I'm still receiving an 'unable to reach app' message when sideloading the app in Teams.
Are there instructions regarding how/what to change within the project so it uses the Azure assets rather than my local ones?
To narrow down what's wrong, have you tried using the Web Chat to test the bot ? If this works, then the bot is working fine in Azure and the issue is for local teams to reach Azure.
Also verify that you are using the right AppID and Password.
Once you have verified that the bot is working in Azure, at the bottom of this page, you will see steps to get a url that you can paste to get the bot added in your local MS Teams instance. (quoting below for quick access)
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.
I did finally get my bot working, but found several missing steps within the deployment documentation. I have reported them in a GitHub issue, associated with the relevant documentation article.

Is Azure subscription needed for MSTeams Bot creation

With the move of Microsoft to disable the App Registration on the legacy portal we created the Bot for our MSTeams APP in Azure portal that is part of the 'Renewable E5 subscription'.But we could not able to set the Bot messaging end point url. Earlier we can able to set that from the MSTeams' App Studio's Bot section but now it is not there. https://dev.botframework.com/ asks us to create a Azure Bot service.
Is it necessary to create a Azure Bot service in order to use and set the Bot message End point ?
If not how can we set the Bot messaging End point without Azure Bot service?
It does seem, now that the functionality is removed from App Studio, that you need to work in the Azure Portal directly (that's all it was doing behind the scenes). This would require an Azure subscription, but you can use any one, so you don't necessarily require an Azure subscription for each team member.
It is important to note though, that the only thing you really need in Azure is a bot "registration". There are two options when creating a bot resource in Azure - one includes a full hosting option ("web app bot"), and associated costs (based on the options selected), and the other is just a "channel registration", which has no cost at all.
When the bot is created, you need to go to it's "Settings" screen, as shown here, where you set the messaging endpoint, but you also need to make sure to go to the "Channels" option on the left menu, and make sure Teams is added as a channel ("channel" here means a platform you want to use your bot on, like Teams, facebook, slack etc.). If your bot had been created in App Studio previously, it would not need the Teams channel added manually, but for new bots it will.
Yes, You need azure subscription. Now you can not create bot from botframework.com. Everything is moved to Azure.

published bot on skype but it's not working

I have a bot that I've created by merging LUIS and QnA together in a single project using Microsoft Bot Builder.
I published the bot to an EC2 instance from visual studio and I'm using the Bot Framework Emulator for testing and it works perfectly. (MUST use ngrok for tunneling).
Now I want to deploy the bot on Skype. I logged into the Bot Framework Portal and I registered my bot. Now comes the configuration part.
I'm not quite sure what to set as the HTTP endpoint here.
I found this in the Bot Framework documentation:
Complete the Configuration section of the form.
Provide your bot's HTTPS messaging endpoint. This is the endpoint
where your bot will receive HTTP POST messages from Bot Connector. If
you built your bot by using the Bot Builder SDK, the endpoint should
end with /api/messages.
If you have already deployed your bot to the cloud, specify the endpoint generated from that deployment.
If you have not yet deployed your bot to the cloud, leave the endpoint blank for now. You will return to the Bot Framework Portal
later and specify the endpoint after you've deployed your bot.
When I published from Visual Studio, from the Azure App Service Activity windows, I found this line:
Start Web Deploy Publish the Application/package to https://ec2-00-000-000-00.compute-1.amazonaws.com:PORT/msdeploy.axd?site=bots ...
I used that address for the Messaging Endpoint in the configuration and I published my app. However when I'm testing it on Skype, i'm not receiving any messages from the bot.
I don't know what the problem is exactly, does this have something to do with ngrok? Or am I missing a step here, is there something else I should be doing to deploy the bot on Skype? Maybe something to do with the appid/password that I need to use ... i really don't know
Would really appreciate an explanation of how this works exactly. I don't really understand how the whole deployment procedure works exactly, feels like i'm swimming in murky waters.
Your endpoint is going to be the root of your deployed web application instance, plus the route that your bot is listening on.
For example, one of my bots is deployed to the free version of Azure Web Sites. The URL for a site such as this is https://APPLICATION_NAME.azurewebsites.net and the route that the bot listens on is the default /api/messages. This makes the endpoint https://APPLICATION_NAME.azurewebsites.net/api/messages.
If you connect directly to your app's endpoint, you should at least get a JSON dump with an error message. To make sure your site is getting deployed, drop an HTML file into the root of EC2 and see if you can access this.

QnA Maker SDK/Azure templates active learning and endpoint URL

Once the bot is created using qnamaker.ai, I wanted to deploy it in Azure using the SDK and publishing from VS2017, which let me define the top parameter to enable the Active Learning as shown in https://github.com/Microsoft/BotBuilder-CognitiveServices/tree/master/CSharp/Samples/QnAMaker
But when I want to register it in dev.botframework the end point URL doesn't work.
If I use Azure Bot Service template, is not possible to set the top parameter but registering in my Bots is ready straight forward.
I have realized that the URL from Azure template contains some extra info, that is not available in my web app
...code=2xDGuyPbupZIm8zsDOucgcHDvXO908dPIad2LFG2y/37TPecdMfQEw==
A "typical" URL from Azure, that work with other deployed Bots is https://"MyBotName".azurewebsites.net/api/messages
Please, can you help enabling the active learning in Azure templates for a Q&A bot?
Can you explain me what should I add to get the "extra details" in my Web app URL?
I think there is some misunderstanding here. The QnA Maker site is not creating any bot for you. It just provisions the QnA service (a rest API).
If you want to have a bot on top of the service you created, grab the code of the QnABotWithActiveLearning sample that you linked, update the QnADialogWithActiveLearning.cs class to include your QnA subscription key (that you can get from the Settings tab of your QnA service), update MicrosotAppId and MicrosoftAppPassword settings on the Web.config with the ones you got from the BotFramework developer portal and deploy to Azure as a Web App.
Once done, you will have the standard websites URL https://"MyBotName".azurewebsites.net and the API endpoint https://"MyBotName".azurewebsites.net/api/messages.
Then just update your bot URL in the BotFramework portal with this URL.

Resources