Forum Discussion

Deepak1265's avatar
Deepak1265
Copper Contributor
Nov 25, 2019
Solved

Is it possible, To send message Individually (Personally) in MS Teams using graph API ?

I want to send personal message to anyone in MS Teams using graph API , Is it possible  if possible how..?

  • Deepak1265  I got solution 

    1. Get "User Id" of user you want to send a message
    GET : - "https://graph.microsoft.com/v1.0/users/"

     

    2. Get chat id of a user
    GET : - "/https://graph.microsoft.com/beta/USER_ID/chats"

    copy the Chat "Id"  on top the list one

    3. You can also get previous message list
    GET : - "/https://graph.microsoft.com/beta/USER_ID/chats/CHAT_ID/messages"

     

    4 . For Send a new message
    POST: - "/https://graph.microsoft.com/beta/USER_ID/chats/CHAT_ID/messages"

    Request Body : -
    {
    "body": {
    "content": " your message "
    }
    }

2 Replies

Resources