Azure / Teams Bot not working - http endpoint not working

What I’m trying to do:
Hi - I have set up a Microsoft Teams app and azure bot. I want the bot to send its payload to a https endpoint in anvil, so that Anvil can answer back on any request sent by the bot.

What I’ve tried and what’s not working:
I am able to create a conversation, send a request to the bot from anvil using the botframework API, and am able to get a request sent from azure by using their DirectLine API.

Unfortunately, I cant get anything when sent from Teams, no request, no ping. When using the azure bot test in WebChat, I am able to see in the logs a request coming in as preflight with OPTIONS, and answering it with headers etc but it stops there. What is also weird is that I get an empty http request a few seconds before the preflight request.

A bit lost today… don’t know if its a setup problem in azure, an issue with the anvil https or something else.

Anybody encountered these issues already and any hints to where to look to solve?

many thanks for your help!

Hi @azm08,

Thanks for providing further details on your app and domain in private. To help with the debugging, please can you try changing your custom domain DNS record from an A Record pointing to our IP address to a CNAME record pointing to anvil.works, then give it another try from Teams?

Please let us know whether that changes anything.

Hi,

Changed from A to CNAME pointing to anvil.works but no change on my side.
Looking at the global setup - I have different subdomains (app1.domain.com, app2.domain.com) with A records pointing to the anvil IP address but the main domain name (domain.com) itself doesn’t point to anything. I also tried with another subdomain to test teams and didn’t work either whereas custom links (not custom domains) work properly.

Thanks

Hi @azm08

Thanks for following up. In that case, I’m afraid there’s no reason incoming requests shouldn’t work from Teams - your custom domain points to the same place the default something.anvil.app domains point to, so there must be some filtering happening in Teams, I guess.

You can publish your app under multiple domains, so I suggest using the something.anvil.app for your Teams bot.

Thanks a lot - I’ll just do that. Simple and it works.