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 QualiWare product download site and prepare to upload it.
  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. The ZIP contents will auto-extract.
  1. Edit repository.json to add repositories and their AI Search index settings (these values drive repository selection in Teams/Copilot). Ensure the index name and semantic configuration match your Azure AI Search index.
  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.