question

Sonali-6504 avatar image
0 Votes"
Sonali-6504 asked Sonali-6504 commented

How to create Microsoft Team in migration mode via Graph AP-Beta version?

I am able to create team via Graph-Explorer, Postman using graph api beta version but same thing I am unable to achieve programmatically

Sample Code:

          Team SourceTeamItem= new Team
           {
                MemberSettings = new TeamMemberSettings
                {
                 AllowCreateUpdateChannels = true,
                 ODataType = null
               },
               MessagingSettings = new TeamMessagingSettings
              {
                 AllowUserEditMessages = true,
                 AllowUserDeleteMessages = true,
                 ODataType = null
             },
             FunSettings = new TeamFunSettings
             {
                 AllowGiphy = true,
                 GiphyContentRating = GiphyRatingType.Strict,
                 ODataType = null
             },
             ODataType = null
         };

        SourceTeamItem.AdditionalData = new Dictionary<string, object>()
        {                                        
                 {"@microsoft.graph.teamCreationMode", "migration"},
        };


        DestinationCreatedTeam = MicrosoftHelper.InvokeApiCall(() =>
             { return this.TeamService.Groups[TGroupID].Team.Request().CreateAsync(SourceTeamItem).Result; }, this);


**Reference :**https://docs.microsoft.com/en-us/microsoftteams/platform/graph-api/import-messages/import-external-messages-to-teams

microsoft-graph-teamwork
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Sonali-6504 would you kindly share the error message when sending the request ?

0 Votes 0 ·

Yes sure, following are error message am getting

Code: UnknownError
Inner error:
AdditionalData:
date: 2021-03-19T10:38:38
request-id: f813b1df-1012-4de9-a6b0-c716dd63c6ca
client-request-id: f813b1df-1012-4de9-a6b0-c716dd63c6ca
ClientRequestId: f813b1df-1012-4de9-a6b0-c716dd63c6ca



0 Votes 0 ·

0 Answers