Forum Discussion
Naveen_Reddy
Feb 24, 2020Copper Contributor
I need to send an individual message to a user using graph api (beta)
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
- @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
- StefanFriedSteel Contributor@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- SyneyCZCopper Contributor
StefanFried reason to use Slack....
- jbrydgesCopper ContributorIf Slack is so great, why are you on a microsoft forum...