AzureAppService – Bot Backend – Deploy

This App Service hosts the Node.js backend used by Microsoft Copilot and the QualiWareAI Teams app.

Required Azure Role

Either one of these built-in roles (or a custom role with equivalent permissions):

  • Owner — full access including role assignments
  • Contributor — manage resources (no role assignments)

If role assignment is needed with Contributor, also grant User Access Administrator.

Azure Administration Tools / Interface

This guide uses the Azure Portal and a manual creation process.

Create and Manage Steps using Azure Portal

1.  Go to AppService and select “Environment Variables”.

2. Following variables would need to be defined This is manual process but these variables are important to make bot backend application to work correctly.

 

Click on Add and Name/value would be defined.  Deployment slot setting should be kept uncheck.

Variables:

  • AZURE_OPENAI_ENDPOINT — Azure OpenAI endpoint URL (value must match your Azure OpenAI endpoint).
  • AZURE_OPENAI_VERSION — API version for Azure OpenAI (use the version shown in your Azure OpenAI configuration).
  • AZURE_SEARCH_API_KEY — Secret API key for Azure AI Search (current integration uses API-key authentication).
  • AZURE_SEARCH_URI — Endpoint URL for Azure AI Search (must match your Azure AI Search service endpoint).
  • LOG_LEVEL — optional; set to debug for troubleshooting.
  • MicrosoftAppType — must be set to UserAssignedMSI.
  • MicrosoftAppTenantId — Azure tenant ID associated with the subscription.
  • MicrosoftAppId — Entra App registration ID for the user-assigned managed identity.
  • REPOSITORY_DATA_SOURCES_CONFIG — set to json (defines repository type + Azure AI Search index mapping).
  • REPOSITORY_DATA_SOURCES_JSON_PATH — path to the JSON mapping file (e.g., C:\home\site\wwwroot\repository.json). Ensure this matches the deployed file location.
  • EMBEDDING_MODEL — embedding model name; use text-embedding-ada-002.
  • MESSAGE_API_KEY — API key used by QualiChat (must be generated securely, stored as an App Service environment variable, and configured on each repository where QualiChat is enabled).

Bot Application Deployment

  1. Download QualiWareAI.zip (Node backend package) from the
    QualiWare product download site and prepare to upload it.
    This file is located in the QualiChat folder for the relevant version.You will find two separate ZIP files in this location:

    • QualiWareAI.zip – Version-specific bot backend application.
    • appPackage.zip – Teams/Co-pilot application package (used in later steps).
  1. Go to the same App Service created in previous steps. Click on Advanced Tools and then launch the Kudu console.

    ⚠️ Important: Only authorized users can access the Kudu console.

    It is recommended to assign roles on the App Service to grant access to:

    • Owner
    • Contributor
    • Website Contributor
    • or a Custom Role with required permissions

    Role assignments can be made through Access control (IAM) on the App Service.
    You must have User Access Administrator rights to add these assignments.

    Custom roles must include the permission:
    Microsoft.Web/sites/publish/Action

  1. In Kudu, go to Debug consoleCMD.
  1. Drag and drop QualiWareAI.zip into
    C:\home\site\wwwroot. You should see the ZIP extracted automatically.In the Debug Console (CMD/PowerShell), Kudu’s file browser has two panes.
    Make sure you drag the ZIP file onto the right-hand pane,
    which displays a “Drag here to upload and unzip” overlay.
    Dropping the file on the left pane will only upload it without extracting.

    Tip:
    If you already uploaded the ZIP file on the left pane, you can still extract it
    manually by running unzip <file.zip> in the Kudu console.

  1. Edit repository.json to define available repositories and their index configurations.The Title field is used to display repository options in the
    repository selection dropdown in the Microsoft Teams or Microsoft Copilot app.

    The Index name and semantic configuration values
    must match the settings created in your Azure AI Search index.

    Note: When updating repository.json, use the exact
    index name and semantic configuration created during the previous step
    (Azure AI Search – Indexing).
    For detailed instructions, refer to Step 9 on the page:

    Azure AI Search – Indexing | QualiWare Center of Excellence

  1. Go to the Keys directory and run node index.js to generate the Message API key.

    This key should:

    • be used by QualiChat,
    • be added as a property for each repository in the Repository Administrator,
    • and be defined as the environment variable MESSAGE_API_KEY in the App Service.

    The environment variable must be created before the bot application can start.

7.  Go back to App Service home page and start/restart the service.