Getting error in bot

Brass Contributor

Hi, we are getting this error from the chat bot of teams.

We get this on response to a text. And this is not consistent. Sometime it works otherwise it throws this error

[onTurnError] unhandled error RestError: Authorization has been denied for this request. 
 {
  "name": "RestError",
  "statusCode": 401,
  "request": {
    "streamResponseStatusCodes": {},
    "url": "https://smba.trafficmanager.net/amer/v3/conversations/a%3A1ubHd4zo21nNipqM4UBie7nFRK6psR9ge20mGt6CcYIoUkmvpcMAdpIzSuv6IS0gfwtsM4xPPU-oSHiC-uQJenTL1FqkqdIb5KOg1WLGdw1rGFYoo1E2I_iGtJOr0l7Ol/activities/1711034217606",
    "method": "POST",
    "headers": {
      "_headersMap": {
        "content-type": "application/json; charset=utf-8",
        "x-ms-conversation-id": "REDACTED",
        "accept": "*/*",
        "user-agent": "Microsoft-BotFramework/3.1 botframework-connector/4.22.1 core-http/3.0.4 Node/v18.19.1 OS/(x64-Windows_NT-10.0.19045)",
        "authorization": "REDACTED"
      }
    },
    "withCredentials": false,
    "timeout": 0,
    "requestId": "2cb6fcd0-23dc-4af5-8c8e-56502eafa1f8"
  },
  "details": {
    "message": "Authorization has been denied for this request."
  },
  "message": "Authorization has been denied for this request."
6 Replies
Thank you for reporting this, we will check this and get back to you.

@ray2408 - We checked with a bot and it's working fine, since there is no consistent repro, could you please share following details with us so that we can investigate further. 

Please share Bot-id, Bot logs, conversation id and tenant id at microsoftteamsdev@microsoft.com.

Hi, this problems is resolved on it's own. I will send the details, if we get this again

Hello @ray2408! how do you fix this? I'm getting the same issue 😕
It just got resolved on its won. I couldn't reproduce it again.
I thik the issue that I had was related to a App Registration and Bot Service Configuration. I created a new ones with the Multitenant option enable instead of Single Tenant, and that fix the error.