Issue regarding Teamchannelmessage are not getting posted using API

sarvesharchive 0 Reputation points
2023-06-11T15:01:22.0233333+00:00

Hi

Basically we are migrating Teams to Teams using below API permissions For Read & Write of Teams.

[Image

](https://filestore.community.support.microsoft.com/api/images/6780da3f-9428-49c6-8f9d-f712e07fc033?upload=true&fud_access=rhYinQu9k%2fQ7lDpdCsGkl3eusmFMeQelfHau4vFjY8lur4WJxfiEK7M3p4%2bs9FkBPy4gjPk1BpzKedTB0Zjh%2bzCRtDd6jCa%2fyokBDwISGOaLz2NNyurtbpNCCvuSAxDElHG%2fn6DLSEvx6me%2bhAe45K5ROM2odn%2fEh23xNQIjlgCaZFJ%2b7KQNx3ZvK3bW1a5XqM1CrFCbwGw3r4hw5W8UnX69vVZ54IewmWqA0ghr%2fjND3bTkRVJvzw3BPDOJ6z4Z7Mn3sNlqhay3LrjLkbAXkF2KH1YQ5Pw%2bXhUEHP2NzRVDx3lCC4o7J0LHGr9HoMDn8%2b1Bbk%2b9C4CcR%2b7xf7JnAVKy%2bx5iaLIGj7mAgJ0CTsc%3d)

earlier we were suppose to create new project add this api permission and submit protected api form for approval ,after that our teams to teams migrations was done properly , but after microsoft new update of no longer need to submit protected api forms we are facing issue while writing TeamsChannelMessage we are using Teamwork.Migrate.All api to write TeamsChannelMessage using below method

[Image

](https://filestore.community.support.microsoft.com/api/images/9d224634-f59e-42a0-964e-cd541c9dfecf?upload=true&fud_access=rhYinQu9k%2fQ7lDpdCsGkl3eusmFMeQelfHau4vFjY8lur4WJxfiEK7M3p4%2bs9FkBPy4gjPk1BpzKedTB0Zjh%2bzCRtDd6jCa%2fyokBDwISGOaLz2NNyurtbpNCCvuSAxDElHG%2fn6DLSEvx6me%2bhAe45OUrZojuRuYimK6TCYgxGwMROP1NoVWNycB4C7C8pSQdqFWdpvh6Dlfh%2b85ZEhZARfipVAXYK%2f%2fAsfSiPkow%2fjW9k5%2br0Lf5Wz5sTCQOaknY6hOZ2kU2bWbfh0iEB4XVc5xW2hXSOp1KP3lbUG%2ffFYzC95sFR2hamb0h35BYOzd6WCI0f%2fhbe%2bpHDNejcv98t%2fEZxnB8D1jVCGccQr8Uh6A%3d)

While processing messages we are getting exception of( Requested API is not Supported) or (Unkonwn Error).

we are not able to migrate a single TeamsChannelMessage .

We need an efficient solution for issue as soon as possible.We would greatly appreciate it if you could spare some time to look into this matter and help us out with the resolution.

Please be in touch at your earliest convenience so that we can figure out how to best solve this problem.

Thank you for your help!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,705 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
4,069 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sayali-MSFT 3,906 Reputation points Microsoft External Staff Moderator
    2023-07-28T05:02:08.9733333+00:00

    The issue happened because the url had missing messageId.

    The url format needs to be

    https://graph.microsoft.com/teams/teamID/channels/channelId/messages to import a root message

    and

    https://graph.microsoft.com/teams/teamID/channels/channelId/messages/messageId/replies to import a reply message

    The passed url was

    https://graph.microsoft.com/teams/teamID/channels/channelId/messages/replies (notice the missing messageId). Hence failure is expected.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.