Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process.
After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response.
Note
Completing the migration of the channel General before completing the migration of other channels leads to a situation in
which the team is marked as migrated, prohibiting you from creating further channels to be migrated.
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type
Least privileged permissions
Higher privileged permissions
Delegated (work or school account)
Not supported.
Not supported.
Delegated (personal Microsoft account)
Not supported.
Not supported.
Application
Teamwork.Migrate.All
Not available.
HTTP request
POST /teams/{team-id}/channels/{channel-id}/completeMigration
POST https://graph.microsoft.com/v1.0/teams/57fb72d0-d811-46f4-8947-305e6072eaa5/channels/19:4b6bed8d24574f6a9e436813cb2617d8@thread.tacv2/completeMigration
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Teams["{team-id}"].Channels["{channel-id}"].CompleteMigration.PostAsync();
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Teams().ByTeamId("team-id").Channels().ByChannelId("channel-id").CompleteMigration().Post(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
graphClient.teams().byTeamId("{team-id}").channels().byChannelId("{channel-id}").completeMigration().post();
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$graphServiceClient->teams()->byTeamId('team-id')->channels()->byChannelId('channel-id')->completeMigration()->post()->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=python
await graph_client.teams.by_team_id('team-id').channels.by_channel_id('channel-id').complete_migration.post()