Unable to connect App Service from Azure Bot (Test in Web Chat)

Satoru Miura 20 Reputation points
2023-12-25T04:14:32.19+00:00

I deployed a application on App Service, and when connecting from Azure Bot to App Service (Test in web chat), "Please provide valid parameters: Invalid resource ID." is displayed.

User's image

Do you know the solution?

■ How to Deploy

  1. Create Azure Bot
    Location:Global
    Bot Service pricing tier:S1
    Bot Type:MultiTenant
  2. Create a web app with App Service Publishing model:Code
    Runtime Stack:Node-20-lts
    Plan Type:App Service plan
    Operating System:Linux
    SKU:Premium0V3 (P0v3)
    Public network access:Enabled with no access restrictions
  3. Creating an application in the local environment Download https://github.com/microsoft/BotBuilder-Samples, run build(npm install) for BotBuilder-Samples-main\samples\javascript_nodejs\02.echo-bot. Confirmed that chat works with Bot Framework Emulator.
    Edit the contents of the .env
    MicrosoftAppType="MultiTenant"
    MicrosoftAppId="{MicrosoftAppID of the bot created in Step.1}"
    MicrosoftAppPassword="{Client secret Value of the bot created in Step.1}"
    MicrosoftAppTenantId=""
  4. Deployment registration and source upload In Power Shell, log in to azure and specify the subscription. Run the following command:
az group deployment create --name "deploy-bot" --resource-group "{my-resource-name}" --template-file "template-with-preexisting-rg.json" --parameters appId="{MicrosoftAppID of the bot created in Step.1}" appSecret="{Client secret Value of the bot created in Step.1}" botId="{Display name of Bot created in Step.1}" newWebAppName="{Default domain of App Service created in Step.2}" existingAppServicePlan="{Name of AppServicePlan}" appServicePlanLocation="japaneast"

The template file uses "template-with-preexisting-rg.json" in the BotBuilder-Samples sample.

az bot prepare-deploy --code-dir "." --lang Javascript

Make a zip file with the name "code.zip"

az webapp deployment source config-zip --resource-group '{my-resource-name}' --name '{Default domain of App Service created in Step.2}' --src "code.zip"

5.App Service configuration changes

Configuration:
MicrosoftAppId:{MicrosoftAppID of the bot created in Step.1} MicrosoftAppPassword:{Client secret Value of the bot created in Step.1} MicrosoftAppType:MultiTenant

6.Connection from Azure Bot

Confirm that the message endpoint is configured with Azure Bot.

However, when I click "Test in web chat" I get the error message "Please provide valid parameters: Invalid resource ID."

There was a question with the same error content in a past question, but it seems that it has not been resolved.

https://learn.microsoft.com/en-us/answers/questions/1073742/please-provide-valid-parameters-invalid-resource-i

(The answer to this question did not resolve the issue.)

Do you know the solution? Or do you have any hints to solve the problem?

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
751 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,960 questions
{count} votes

Accepted answer
  1. navba-MSFT 17,365 Reputation points Microsoft Employee
    2023-12-28T04:58:37.03+00:00

    @Satoru Miura Thanks for your reply. I'm glad to see you were able to resolve your issue. Thanks for posting your solution so that others experiencing the same thing can easily reference this. Since the Microsoft Q&A community has a policy that the question author cannot accept their own answer, they can only accept answers by others, I'll repost your solution in case you'd like to Accept the answer.
    .
    Issue:
    You have deployed an application on App Service, and when connecting from Azure Bot to App Service (Test in web chat), Please provide valid parameters: Invalid resource ID error is displayed.
    .
    Cause:
    The cause was that Japanese full-width characters were used in the resource group name.
    .

    Resolution:
    By moving the resource group name to a resource group with all half-width alphabets, it worked properly.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful