Forum Discussion
Sending a message in a Teams channel using a fictitious user via Microsoft Graph API
Hi everyone,
I have the following requirement:
I have created a fictitious user to send a message in a Teams channel, a sort of alert.
I am able to log in to Graph Explorer with this user and by using the following Graph API call https://graph.microsoft.com/beta/teams/{group_id}/channels/{channel_id}/messages I can send a message inside the Microsoft Teams channel.
Now, my question is: how can I insert a message into the Channel from "outside" Graph Explorer, without direct login in with the user, for example using a Postman request? I am positive that I have all the necessary information, like client IDs, tokens, etc.
Since I am by no means an expert in Microsoft Graph or API calls, I'm kindly asking for your help.
Thanks in advance and kind regards,
Diego
- Terry WellsCopper ContributorThe only way so far I have been able to do is via Power Automate.
Follow the steps here and it *WILL* work.
https://www.c-sharpcorner.com/article/sending-teams-message-to-any-user-from-a-specific-user-from-powerautomate/ - HelloBenTeohBronze ContributorSimilar to Terry Wells’ example, if you’re posting to a channel, you can log into Power Automate with your fictitious user and create a flow to post a message to the channel - https://learn.microsoft.com/en-us/power-automate/teams/send-a-message-in-teams#posting-a-message-as-the-user-in-a-teams-channel