Bot is not responding to @Mention when sending message using Graph API

旧巷老猫 提交于 2020-01-25 08:06:45

问题


I have created and deployed a bot in Microsoft Teams. Bot Works properly and responds when user talks to the bot using @Mention (e.g. @mybot) in a channel. I just tried to send message to the bot using graph API call: https://graph.microsoft.com/beta/teams/{group-id-for-teams}/channels/{channel-id}/messages

Method: POST

Content-type: application/json

Body:

"body": {
    "contentType": "html",
    "content": "Hello World <at id=\"0\">standupbot</at>"
  },
  "mentions": [
    {
      "id": 0,
      "mentionText": "StandupBot",
      "mentioned": {
        "application": {
                            "id": "[my-bot-id]",
                            "displayName": "StandupBot",
                            "applicationIdentityType": "bot"
                        }
      }
    }
  ]
}

The Post request goes well, message is posted in my team and bot gets mentioned. But bot is not responding to the mention. However, if user manually mentions the bot in team then bot responds.

What is wrong here, Am i missing something or is it a bug? Please guide.

P.S: I am using Graph Explorer.

来源:https://stackoverflow.com/questions/59391762/bot-is-not-responding-to-mention-when-sending-message-using-graph-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!