Publish a bot to Azure

This article describes how to sign in to Azure, provision Azure resources, import existing Azure resources, and publish a basic bot to Azure Web App (Preview), all from within Bot Framework Composer.


If you choose to run scripts to provision Azure resources and publish your bot, follow the instructions in the README file of your bot's project folder, for example, under this directory: C:\Users\UserName\Documents\Composer\BotName.


Sign in to Azure

  1. Select Publish from the Composer menu.

  2. In the Publish your bots page, under the Publish target section, select Manage profiles from the drop-down menu.

    manage profile

  3. On the Bot management and configurations page, select Add new from the Publish profiles section.

    add new publish profile

  4. On the Add a publishing profile window, enter a name in the Name field. For the Publishing target, select Publish bot to Azure Web App (Preview). Then select Next: Configure resources.

    add publish profile fields

    Field Description Example
    Name The name of your publishing profile Test01
    Publishing target The target where you publish you bot Publish to Azure Web App (Preview)
  5. You will then see the Sign in window. Enter the email address associated with your Azure account and select Next.

    signin azure

After signing in to Azure successfully, you will be directed to the Configure resources window. At the lower-left of the Configure resources window, you will see your Azure account information.

The next step is to select how you would like to provision and publish your bot. There are two options to proceed:

Create new Azure resources

This section covers steps to provision Azure resources from within Composer. If you already have your Azure resources provisioned or created manually in the Azure portal, follow the instructions in Import existing Azure resources instead.

  1. Once you are signed in to Azure from Composer, select Create new Azure resources from the Configure resources window and provide the requested information. Then select Next: Review.

    configure resources

    Field Required/Optional Description
    Subscription Required The Azure subscription in which to create the resources.
    Resource group name Required A new or existing resource group to use for the created resources.
    Resource name Required The name to use as the full name or prefix of the the resources to create.
    Region Required The region selected to provision the Azure resources.
  2. On the Add resources window, you will see a complete list of resources you can create. Some of them are required and some are optional.

    Resource Required/Optional
    Application Registration Required
    App Service Required
    Bot Channels Registration Required
    Azure Cosmos DB Optional
    Application Insights Optional
    Azure Blob Storage Optional
    LUIS authoring resource (Cognitive Services) Optional
    LUIS prediction resource (Cognitive Services) Optional
    QnA Maker resource (Cognitive Services) Optional
  3. Use the control to the left of each optional resource to choose whether to create that resource. (You might need to hover over the column to see the control. You can also toggle your choice for a whole group of resources at once.) Then, select Next.

    review and create


    If you are provisioning LUIS resources, make sure you select both the LUIS authoring resource and the LUIS prediction resource. If you already have a LUIS authoring or prediction resource configured locally, the provisioning process will create new ones for you.

  4. On the Review & create window, review the resources that will be created. Select Done.

  5. You will see the provisioning message on the upper right corner of your Composer. Once these resources are provisioned, you will see them in your Azure portal.



    The provisioning process will usually take a few minutes to complete.

    After you see the Provision success message on the upper right corner of the Composer screen, the provisioning process is completed.

    provision complete

    Navigate to your Azure portal to see the new resources created.

    azure resources

Next, follow the instructions covered in the publish section to publish your bot.

Import existing Azure resources

This section covers steps to import existing Azure resources. If you don't have your Azure resources provisioned, follow the instructions from the Create new Azure resources section.

  1. If you have not already done so, sign in to Azure from Composer. Once you complete that process, you will be in the Configure resources wizard. Select Import existing Azure resources.

  2. Create a JSON file using one of the following templates.

    • If you do not have any other services configured, use the following.

          "hostname": "<your web app name>",  
          "settings": {
              "MicrosoftAppId": "<the appid of your bot channel registration>",
              "MicrosoftAppPassword": "<the app password of your bot channel registration>"
    • If you have additional services configured, such as LUIS or QnA Maker, use the following.


      You can leave the placeholder text for any of the services your bot doesn't use.

          "name": "<NAME OF YOUR RESOURCE GROUP>",
          "environment": "<ENVIRONMENT>",
          "hostname": "<NAME OF THE HOST>",
          "luisResource": "<NAME OF YOUR LUIS RESOURCE>",
          "settings": {
            "applicationInsights": {
              "InstrumentationKey": "<SOME VALUE>"
            "cosmosDb": {
              "cosmosDBEndpoint": "<SOME VALUE>",
              "authKey": "<SOME VALUE>",
              "databaseId": "botstate-db",
              "collectionId": "botstate-collection",
              "containerId": "botstate-container"
            "blobStorage": {
              "connectionString": "<SOME VALUE>",
              "container": "transcripts"
            "luis": {
              "endpointKey": "<SOME VALUE>",
              "authoringKey": "<SOME VALUE>",
              "region": "westus"
            "qna": {
              "endpoint": "<SOME VALUE>",
              "subscriptionKey": "<SOME VALUE>"
            "MicrosoftAppId": "<SOME VALUE>",
            "MicrosoftAppPassword": "<SOME VALUE>"


    You should author and publish LUIS in the same region. Read more in the Authoring and publishing regions and associated keys article.

  3. Replace the contents of the Publish Configuration field with the contents of the JSON file you created. Select Save.

    import existing resource

    After this step is completed, follow the instructions to publish your bot to Azure.


  1. Select Publish from the Composer menu. On the Publish your bots page, select a bot to publish then select a publish profile from the Publish target drop-down list.

    publish bot

  2. Select Publish selected bots to open the Publish window.

    publish selected bots

  3. On the Publish window, select Okay and start the publishing process.

    publish process


    The publishing process will usually take a few minutes to complete.

    After the publishing process completes, you will see the Success message.

    publish complete

    Next, move on to test your bot in Azure.


Open your Azure portal to test the newly published bot in Test in Web Chat.

Test in Web Chat

Additional information

View and access your published LUIS app

If you publish a bot with LUIS data, your can view and access the published LUIS apps after you publish the bot to Azure. LUIS apps in the LUIS portal are associated with the LUIS authoring resources you created in the Azure portal.

After publishing the bot with LUIS configuration to Azure, you will see the published LUIS resources (both LUIS authoring resource and LUIS prediction resource) from the Azure portal as follows:

LUIS resources in Azure portal


The LUIS authoring resource has an luis-authoring suffix. The LUIS authoring resource allows you to create, manage, train, test, and publish your LUIS applications. The LUIS prediction resource has a luis suffix. You use the prediction resource or key to query prediction endpoint requests. Read more in the Create LUIS resources article.

To view and access the LUIS apps from the LUIS portal, make sure you select the matching LUIS authoring resource as shown in your Azure portal.

LUIS resource in LUIS portal

With the correct LUIS authoring resource selected, you will then see the associated LUIS apps from the LUIS portal.

LUIS apps in LUIS portal