Forum Discussion

HansWeFi's avatar
HansWeFi
Copper Contributor
Nov 13, 2024

Teams Bot can't connect to Azure App Service

Hi

 

I have a built a basic Bot using nodejs and Bot FW 4*, but fr my deployment tests I am simply using the community echo bot.

I have been through every debugging process I can but cannot figure out why my Teams Channel simply won't work. The back-end receives no http requests if its hosted on Azure App Service (windows or linux), else works perfectly.

 

Is there something special that I need to do on the App Service config... Here are the facts

 

  • The Azure Bot works perfectly using Test in Web Chat, with the nodejs back-end hosted on Azure App Service , both when deploying to Windows or Linux instances. This confirms the messaging end point  is working.
  • The App Service's networking is all public and the generated domain served via HTTPS. The end point is accessible and accepting  requests (works in Web Chat)
  • I have request logging to log all incoming calls to the nodejs server, but nothing actually reaches the server when going via the Teams channel
  • If I update the messaging end point to point to my local dev server via a devtunnel, then the Bot DOES work in both WebChat AND Teams channel
  • When I say does not work in Teams Channel, I simply get no response in the chat window, but I am able to send requests
  • I also tried publishing the Bot in MS Teams, which published successfully,. but still does not work
  • Our Teams is using the same tenant as my bot

 

My only conclusion is that MS Teams has some issue when the Bot end point is hosted on an Azure App Service (remember it works when pointing to another end point, my local devtunnel)

 

Any help would be greatly appreciated

Hans

 

 

  • HansWeFi's avatar
    HansWeFi
    Nov 14, 2024

    Hi

     

    As mentioned, the Teams channel is healthy and works when I point to another en dpoint NOT on azure.

    However, I have actually fond the solution. MS Teams does not like the default App service URL or Cert
    https://[appservice name].azurewebsites.net  (public, not netwrok restrictions)

    It only works if I put Front Door/WAF in front of the service.

    Very bizarre, but its what made it work

  • @HansWeFi - Make sure your bot is set up correctly in the Azure portal. Go to your Azure Bot resource, click on Channels, and check that the Microsoft Teams channel is properly configured.

    • HansWeFi's avatar
      HansWeFi
      Copper Contributor

      Hi

       

      As mentioned, the Teams channel is healthy and works when I point to another en dpoint NOT on azure.

      However, I have actually fond the solution. MS Teams does not like the default App service URL or Cert
      https://[appservice name].azurewebsites.net  (public, not netwrok restrictions)

      It only works if I put Front Door/WAF in front of the service.

      Very bizarre, but its what made it work

Resources