1
votes

I have an app containing a bot on Microsoft Teams, built using the bot-framework. I need my application to be able to let users send message to a specific channel and thread. I can do this with my bot using the "proactive messaging" ability, but the message is then send by the bot, not the user. Is there any way to achieve this as if the user sent the message?

1

1 Answers

1
votes

You don't need to use the bot.

Just try this Microsoft Graph API endpoint (beta version):

POST https://graph.microsoft.com/beta/teams/TEAM_ID/channels/CHANNEL_ID/chatThreads
{
 "RootMessage": {
    "body": {
       "contentType": 1,
       "content": "Hello World!"
      }
  }
}

Remember that you need to implement the Authentication on behalf of a user.