SOLVED

I need to send an individual message to a user using graph api (beta)

%3CLINGO-SUB%20id%3D%22lingo-sub-1190280%22%20slang%3D%22en-US%22%3EI%20need%20to%20send%20an%20individual%20message%20to%20a%20user%20using%20graph%20api%20(beta)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1190280%22%20slang%3D%22en-US%22%3E%3CP%3EMy%20requirement%20is%20using%20any%20api%20(beta)%20I%20need%20to%20send%20a%20message%20to%20a%20user%20of%20MS%20Teams.%20I%20have%20the%20id%20of%20the%20user.%20I%20only%20see%20api's%20where%20it%20can%20be%20sent%20to%20a%20channel%20and%20not%20individually.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESomething%20like%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fchannel-post-messages%3Fview%3Dgraph-rest-beta%26amp%3Btabs%3Dhttp%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fchannel-post-messages%3Fview%3Dgraph-rest-beta%26amp%3Btabs%3Dhttp%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESomething%20like%20-%26gt%3B%26nbsp%3B%3CSPAN%3EPOST%20%2Fuser%2F%7Bid%7D%2Fmessages%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1190280%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EChat%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%20Integration%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1193369%22%20slang%3D%22en-US%22%3ERe%3A%20I%20need%20to%20send%20an%20individual%20message%20to%20a%20user%20using%20graph%20api%20(beta)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1193369%22%20slang%3D%22en-US%22%3E%40naveen_reedy%3CBR%20%2F%3E%3CBR%20%2F%3EVia%20graph%20this%20does%20not%20exist%20atm.%20I%20guess%20one%20could%20use%20the%20native%20undocumented%20teams%20api%20in%20combination%20with%20an%20azure%20app.%3CBR%20%2F%3E%3CBR%20%2F%3EAs%20an%20alternative%20you%20could%20create%20a%20private%20message%20or%20even%20group%20message%20by%20using%20deep%20links....not%20sure%20of%20this%20is%20an%20option%20for%20you.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fconcepts%2Fbuild-and-test%2Fdeep-links%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fconcepts%2Fbuild-and-test%2Fdeep-links%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EExample%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2F%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fteams.microsoft.com%2Fl%2Fchat%2F0%2F0%3Fusers%3D%3CUSER1%3E%2C%3CUSER2%3E%2C...%26amp%3BtopicName%3D%3CCHAT%3E%3C%2FCHAT%3E%3C%2FUSER2%3E%3C%2FUSER1%3E%3C%2FA%3E%20name%26gt%3B%26amp%3Bmessage%3D%3CPRECANNED%20text%3D%22%22%3E%3CBR%20%2F%3E%3CBR%20%2F%3EHth%3CBR%20%2F%3EStefan%3C%2FPRECANNED%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2065801%22%20slang%3D%22en-US%22%3ERe%3A%20I%20need%20to%20send%20an%20individual%20message%20to%20a%20user%20using%20graph%20api%20(beta)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2065801%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F44882%22%20target%3D%22_blank%22%3E%40Stefan%20Fried%3C%2FA%3E%26nbsp%3Breason%20to%20use%20Slack....%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

My requirement is using any api (beta) I need to send a message to a user of MS Teams. I have the id of the user. I only see api's where it can be sent to a channel and not individually.

 

Something like https://docs.microsoft.com/en-us/graph/api/channel-post-messages?view=graph-rest-beta&tabs=http

 

Something like -> POST /user/{id}/messages

2 Replies
Best Response confirmed by Naveen_Reddy (Occasional Visitor)
Solution
@naveen_reedy

Via graph this does not exist atm. I guess one could use the native undocumented teams api in combination with an azure app.

As an alternative you could create a private message or even group message by using deep links....not sure of this is an option for you.

https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/deep-links

Example:
https://teams.microsoft.com/l/chat/0/0?users=<user1>,<user2>,...&topicName=<chat name>&message=<precanned text>

Hth
Stefan