SOLVED

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

Copper Contributor

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

2 Replies
best response confirmed by Deepak1265 (Copper Contributor)
Solution

@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

picture2.jpg

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 "
}
}

1 best response

Accepted Solutions
best response confirmed by Deepak1265 (Copper Contributor)
Solution

@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

picture2.jpg

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 "
}
}

View solution in original post