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.
Do you know the solution?
■ How to Deploy
- Create Azure Bot
Location:Global
Bot Service pricing tier:S1
Bot Type:MultiTenant
- 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
- 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=""
- 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?