Microsoft Teams offers Pin functionality to highlight an important message. In a typical chat conversation, there will be a huge number of messages. Pinning a specific reply or a message will help everyone visually identify it as an important one.
In this article, we will cover how to pin a message using Power Automate.
Pin chat messages
Pinning a chat message provides quick access to the important content. Any participant can pin a chat message.
More than one message or message reply can be pinned at a time. We can use this functionality to highlight a potential valuable reply. This will help everyone to look at the pinned reply and save time to read through all replies.
Unfortunately, we do not have a programmable way to Pin the chat message. As of today, we do not have any PowerShell or MS Graph API support for this functionality.
The background processing
Let us analyze what happens in the background when you pin a message in MS Teams.
- Open Microsoft Teams in a browser.
- Open the Developer toolbar and navigate to the Network tab.
- Navigate to a conversation with replies.
- Pin a message reply and observe the background calls from the Network tab.
The highlighted call goes in the background. Let us analyze the elements of it.
- This refers to the channel id of the General channel of the team.
- This refers to the channel id of the Team channel where the message is pinned
- This refers to the Id of the message.
Power Automate to pin the message
I came across an interesting article - Teams Status Update via Power Automate by Damien Bird mentioning that the undocumented Teams API can be called from Power Automate by leveraging
Send HTTP request to SharePoint action.
The below action in Power Automate will do the trick to pin a message in MS Teams.
Pin functionality in Microsoft Teams helps to highlight an important message. As of now, we do not have any PowerShell or MS Graph API support for this functionality. However, this approach should help you do the trick to pin the messages.
Please do not use this functionality in the Production, as it is using undocumented Teams API.