Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
Hi L
Thank you for reaching out to Microsoft Q&A forum
Based on the behavior you have described, you are not missing anything, and this is a known behavior of the Microsoft Graph API.
Technically, the **POST /chats/{chatId}/pinnedMessages**endpoint, along with its corresponding GET /chats/{chatId}/pinnedMessages(List pinnedChatMessages) endpoint, is scoped exclusively to chat resources, including one-to-one chats, group chats, and meeting chats. It is not designed to work with Teams channels.
As far as I know, there is currently no Microsoft Graph API endpoint in either the v1.0 or beta versions. that supports pinning messages in a Teams channel. The pinning capability visible in the Teams channel UI has not been exposed through Graph API as of this writing.
Until now, the practical approach is to complete the message import migration first, then call the completeMigration endpoint to bring the team and channel out of migration mode. After that, an owner or member with sufficient permissions can manually pin the relevant message through the Teams desktop or web client.
Hope my answer will help you.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.