Home

MS Teams Graph API @Mention a Bot

%3CLINGO-SUB%20id%3D%22lingo-sub-693222%22%20slang%3D%22en-US%22%3EMS%20Teams%20Graph%20API%20%40Mention%20a%20Bot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-693222%22%20slang%3D%22en-US%22%3E%3CP%3EWe're%20doing%20some%20work%20with%20a%20bot%20that's%20been%20added%20as%20a%20member%20to%20a%20Teams%20channel%2C%20and%20are%20attempting%20to%20send%20a%20message%20to%20the%20bot%20through%20the%20at_mention%20function%20to%20have%20the%20bot%20take%20some%20action.%20Below%20is%20the%20full%20JSON%20request%20that%20we're%20posting%20to%20the%20Messages%20API.%20The%20post%20appears%20to%20at_mention%20the%20bot%2C%20but%20the%20bot%20doesn't%20respond.%20Have%20tested%20this%20with%20multiple%20bots%20in%20this%20channel%2C%20and%20doesn't%20appear%20that%20the%20problem%20is%20specific%20to%20the%20particular%20bot%20we're%20working%20with.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20would%20be%20greatly%20appreciated!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%3EPOST%20%3CA%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fteams%2F%3CTEAM-ID%3E%2Fchannels%2F%3CCHANNEL-ID%3E%2Fmessages%3C%2FCHANNEL-ID%3E%3C%2FTEAM-ID%3E%3C%2FA%3E%3CBR%20%2F%3EContent-type%3A%20application%2Fjson%3C%2FDIV%3E%3CDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CDIV%3E%7B%3CBR%20%2F%3E%26nbsp%3B%20%22body%22%3A%20%7B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%22contentType%22%3A%20%22html%22%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%22content%22%3A%20%22%3CDIV%3E%3CDIV%3E%3CAT%20id%3D%22%5C%26quot%3B0%5C%26quot%3B%22%3ECisco%20Webex%20Meetings%3C%2FAT%3E%20site%20test.webex.com%3C%2FDIV%3E%5Cn%3C%2FDIV%3E%22%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%7D%2C%3CBR%20%2F%3E%26nbsp%3B%20%22mentions%22%3A%20%5B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%7B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%22id%22%3A%200%2C%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%22mentionText%22%3A%20%22Cisco%20Webex%20Meetings%22%2C%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%22mentioned%22%3A%20%7B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%22application%22%3A%20%7B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%22displayName%22%3A%20%22Cisco%20Webex%20Meetings%22%2C%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%22id%22%3A%20%22%3CBOT-ID%3E%22%2C%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%22applicationIdentityType%22%3A%20%22bot%22%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%7D%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%7D%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%7D%3CBR%20%2F%3E%26nbsp%3B%20%5D%3CBR%20%2F%3E%7D%3C%2FBOT-ID%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20467px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F118156i94E3F93C7CB83DA4%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22photo.jpg%22%20title%3D%22photo.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-693222%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAPI%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EBots%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Egraph%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETeams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1071813%22%20slang%3D%22en-US%22%3ERe%3A%20MS%20Teams%20Graph%20API%20%40Mention%20a%20Bot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1071813%22%20slang%3D%22en-US%22%3E%3CP%3EFacing%20the%20same%20issue%2C%20did%20you%20find%20any%20solution%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Deleted
Not applicable

We're doing some work with a bot that's been added as a member to a Teams channel, and are attempting to send a message to the bot through the at_mention function to have the bot take some action. Below is the full JSON request that we're posting to the Messages API. The post appears to at_mention the bot, but the bot doesn't respond. Have tested this with multiple bots in this channel, and doesn't appear that the problem is specific to the particular bot we're working with. 

 

Any help would be greatly appreciated!

 

 
{
  "body": {
    "contentType": "html",
    "content": "<div><div><at id=\"0\">Cisco Webex Meetings</at> site test.webex.com</div>\n</div>"
    },
  "mentions": [
    {
      "id": 0,
      "mentionText": "Cisco Webex Meetings",
      "mentioned": {
        "application": {
          "displayName": "Cisco Webex Meetings",
          "id": "<bot-id>",
          "applicationIdentityType": "bot"
        }
      }
    }
  ]
}
 
photo.jpg
1 Reply
Highlighted

Facing the same issue, did you find any solution?

Related Conversations
Modify Outlook invite links
arifC in Microsoft Teams on
4 Replies
Anyone else had Teams vanish from the apps list?
PhilC42 in Surface Hub on
1 Replies
Teams call transfer failed - Audiocodes VE
Olah Laszlo in Microsoft Teams on
0 Replies
Which headsets?
redtechguy in Microsoft Teams on
2 Replies