Add reaction to an already posted message

Parag Jadhav 1 Reputation point
2022-08-03T05:53:25.833+00:00

Hello,

I'm looking for a way to add a reaction to a message which is already posted in MS Teams. I am referring to the following documentation:

https://learn.microsoft.com/en-us/graph/api/resources/chatmessagereaction?view=graph-rest-1.0

https://learn.microsoft.com/en-us/graph/api/chat-post-messages?view=graph-rest-1.0&tabs=javascript

But this documentation is not clear enough and is a little confusing.

Has anyone tried this? Any help is appreciated.

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 46,376 Reputation points
    2022-08-03T09:00:00.263+00:00

    Hi @Parag Jadhav

    We are currently unable to add reaction to an already posted message.

    I've tried editing the parent message state by Update chatMessage and Reply to a message in a channel to add reactions for the message, but I keep getting the "'reactions' cannot be set in POST" error.

    227606-image.png

    Until I found the exact same question on SO:

    The API to reply to a message using a POST /replies request is solemnly for issuing a reply to a message, and not to edit the status of the parent message itself. Moreover, the "update chatMessage" API which is a PATCH /messages and which is the only API to edit a parent message only supports updating the policyViolation property of a chatMessage. Essentially, there is currently no documented API / already-present API examples on how to add a reaction, making this purely unsupported.


    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.