Hessel
Hessel

Reputation: 762

How do I manually deploy Bot Framework SDK chatbot to Azure

I need to deploy a number of chatbots in Azure. I made the botcode for the chatbots and tested them in the Bot Framework Emulator. Now I am ready to deploy them to Azure.

I haven't done this for a while. In the past, I used to create a resource called Web App Bot for this and deploy the botcode via Github. This would give me a webapp bot resource and an app service that I could deploy my botcode to. Worked like a charm. This resource is not available anymore.

I did find a resource called Azure Bot. There is however no option to deploy any botcode to that resource.

I tried to create all resources via composer -> error and the request to file this in github I tried to use Azure Cli -> error without any clear explanation.

Is it possible to just manually create all resources to host a Bot Framework chatbot on Azure and what are these steps?

Update 13 feb

  1. I Created a Webapp for my botcode by just cloning a Webapp (from an earlier Web App Bot deployment) and changed the github repositiy. That works.
  2. Next I created a Azure Bot. Changed the url to the url of the app and added api\messages to it.
  3. Testing the bot results in:

Azure bot Webchat channel status overview: "There was an error sending this message to your bot: HTTP status code InternalServerError"

Web App console: "Error: Unauthorized. Invalid AppId passed on token"

  1. So I added the Azure Bot's AppId (MicrosoftAppId) to the configuration of the WebApp.

Azure bot Webchat channel status overview: "There was an error sending this message to your bot: HTTP status code InternalServerError"

Web App console: "Failed to query knowledgebase: object Object UnhandledPromiseRejectionWarning: Error: BotFrameworkAdapter.processActivity(): 500 ERRORError: The clientSecret parameter is required" I guess I also need to add the MicrosoftAppPassword.

  1. Press Manage Password in the configuration blade of the Azure bot -> Insufficient privileges to complete the operation.

Update 15 feb 6. I managed to create a new secret by visiting the Appregistration itself. Not being able to click Manager Passwords is a bug (I think)

  1. I added to 2 application settings in the Web Appp. One for MicrosoftAppId and one for MicrosoftAppPassword (the secret). As value For the first setting I used Application (client) ID from the app registration For the second I used the value of the secret I created in the app registration

Done. A working bot deployment

Upvotes: 1

Views: 828

Answers (1)

Ramprasad
Ramprasad

Reputation: 132

Here is the document/sample to create and deploy bot to azure.

Upvotes: 0

Related Questions