bot not working - webchat channel giving HTTP 401 Unauthorized

nkerifacclaud 5 Reputation points
2024-05-18T20:10:20+00:00

Hi, I built a bot using bot framework and tested it locally and it is working perfectly. I later published to Azure and when i test from webchat there is no response, error on the webchat channel was "There was an error sending this message to your bot: HTTP status code Unauthorized".

User's image

I verified the appId and password and they look fine.

Does anyone have any ideas?

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
840 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VasaviLankipalle-MSFT 17,476 Reputation points
    2024-05-20T21:47:24.74+00:00

    Hello @nkerifacclaud , I'm glad that you were able to resolve your issue and thank you 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: bot not working - webchat channel giving HTTP 401 Unauthorized

    Solution: The workaround:

    • manually created a bot service from azure portal as multi tenant
    • updated the message endpoint to that of the app service deployed by framework composer and
    • added the appId and password in environmental variables of the app service.

    User's image

    Composer doesn't create bot service correctly so we should only use the app service it deploys.

    Thank you again for your time and patience throughout this issue.

    Regards,
    Vasavi

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.