Troubleshooting - OfficeDev/microsoft-teams-apps-greatideas GitHub Wiki

Generic possible issues

1. Bot returns 'You are not authorized to access this Bot. Please contact administrator.'**

Checking application settings in app service

Problems while deploying to Azure

1. Error when attempting to reuse a Microsoft Azure Active Directory application ID for the bot registration**

Bot is not valid. Errors: MsaAppId is already in use.

  • Creating the resource of type Microsoft.BotService/botServices failed with status "BadRequest"

This happens when the Microsoft Azure application ID entered during the setup of the deployment has already been used and registered for a bot.

Fix:

Either register a new Microsoft Azure Active Directory application or delete the bot registration that is currently using the attempted Microsoft Azure application ID.

2. ARM deployment failure

{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"Conflict","message":"{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\"\r\n }\r\n}"}]}

This could happen due to failure in KUDU deployment to your app services because of time out or npm installation failure.

Fix:

  1. In the deployment overview page, check if the failed state column is for Type 'Microsoft.Web/sites/sourcecontrols'.
  2. Click on the Resource with same name but Type as 'Microsoft.Web/sites' (this would your Azure app service)

Azure app service source control deployment failure overview

  1. On left menu blade, under Deployment > click on Deployment center
  2. Check the 'Status' column and if marked as 'Failed', then on the top menu, click on 'Sync'
  3. Wait until KUDU deployment sync the latest changes and redeploy the service (will take around 10-15 minutes)

/Images/SyncAppService.png

Problems while customizing bot

1. Client app packages restoration failure for first build**

Once repository is cloned and you try to build the solution in Visual Studio, build fails due to multiple NPM packages fails to install.

Fix: If you have cloned using Visual Studio, please retry building solution after closing and re-opening the Visual Studio.

If you still get errors, navigate to 'ClientApp' folder in project directory using file explorer. Open command prompt at this location and type 'npm install'. This will install app the packages for client app. Once it is done, try rebuild solution from Visual Studio.

Problems in bot

If facing any issues related to bot/Messaging Extension.

Fix Please go to app-insights and check for errors.

  • Go to azure portal
  • Go to App-insights related to your app.
  • Open Logs (Analytics)
  • Select Time Range & fire the query from different tables like exceptions, customEvent etc. like below:

AppInsights

Didn't find your problem here?

Please, report the issue here