How to fix Teams Bot Service returned a unauthorized 401 error when I sent a message in my Teams Bot APP?


I have built a TeamsBot APP in my org.

I have deployed the bot service in my service, configured the correct message endpoint, generated the APP_Password, and used it.

Then I entered some messages in the Teams dialog to my bot, just like the below picture:send message to bot

and there is nothing returned, so I checked the gateway to fetch the 401 response message, it looks like the MS response messageUser's image

I'm new to using the Teams APP toolkit, so I'm not sure what happened, would you please help me to find the reason and tell me how to fix it?

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
7,669 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,380 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ran Hou-MSFT 2,445 Reputation points Microsoft Vendor

    @Kido.G.Zhao (tech.cncd02.Newegg) 42544

    Thanks for visiting our forum. Microsoft Teams tag is mainly focused on the general issue of Microsoft Teams application troubleshooting. Based on your description, this problem is related to Teams development, which is not in our support scope. So, I will also add Teams development tag to your thread. Thanks for your understanding!

    The following is for informational purposes only:

    Azure API Management Troubleshooting Scenario 3 - Receiving unauthorized errors (401) while invoking APIs - Azure | Microsoft Learn

    Hope the above information is helpful to you.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful