简体   繁体   中英

Teams Toolkit HelloWorld chat bot - Failed to send

I've just downloaded Teams Toolkit onto VSCode and used the plugin to create a Command Bot project. Completed all the prerequisites and configurations on my tenant (I'm the admin for our 365 business account)

Everything installs great.

I hit f5 to launch the debugger.

  • All prerequisite checks pass.
  • Chrome opens
  • I can [Add] my local debug bot into the web app version of teams

I go to send any message OR the helloWorld command that comes with the template app and it gives me “Failed to send message” error.

When I hit F12 to bring up the Chrome dev tools and go into the.network tab to see the call that is being sent, I see and Error as the response payload: errorCode 201 errorSubCode 1 with the message “One or more of the user ids provided are not valid."

Payload:

{
  "members": [
    {
      "id": "8:orgid:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "role": "Admin"
    },
    {
      "id": "28:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "role": "Admin"
    }
  ],
  "properties": {
    "threadType": "chat",
    "chatFilesIndexId": "2",
    "uniquerosterthread": "true",
    "fixedRoster": "true"
  }
}

Response

{
  "errorCode": 201,
  "message": "One or more of the user ids provided are not valid.",
  "standardizedError": {
    "errorCode": 201,
    "errorSubCode": 1,
    "errorDescription": "One or more of the user ids provided are not valid."
  }
}

I haven't written any custom code or made any changes. Just trying to launch the bot straight from Toolkit creation.

I've also tested the ngrok session that is connected to make sure that communication back to me is working fine. I see logging when I try to hit the ngrok url so I feel this is a failure at the point of Teams trying to send to their API.

I've followed all the steps in the documentation regarding setup. I would appreciate any help anyone would have on this.

Thank you

This is probably caused by incorrectly bot identity used in Teams channel registration in Bot Framework . Not quite sure what happen when calling the bot framework service to do the bot registration herre.

You can check if your App ID and password is correctly in Bot Framework registration: 在此处输入图像描述

The bot credentials in.fx configs: 在此处输入图像描述 The app password can be decrypted from local.userdata

To resolve this, could you please try one of the following solutions:

  1. Create a new Command Bot and run F5 again.
  2. Or, you can delete the local.userdata and state.local.json files in your current project. And then re-run F5, the toolkit should create a new AAD app for your bot registration in this case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM