Nov 25 2019 04:19 AM - edited Nov 25 2019 04:31 AM
I want to send personal message to anyone in MS Teams using graph API , Is it possible if possible how..?
Nov 25 2019 11:56 AM
Nov 26 2019 04:19 AM
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
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 "
}
}
Nov 26 2019 04:19 AM
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
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 "
}
}