From 707f98b5ab058d0f5d16408f762ccfb4edde1431 Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Fri, 1 Aug 2025 16:34:30 +0530 Subject: [PATCH 01/30] Created a new draft for migrating external message to Teams --- .../new-draft-external-messages-to-teams.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md new file mode 100644 index 00000000000..736c8786330 --- /dev/null +++ b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md @@ -0,0 +1,10 @@ + +## Import third-party platform messages to Teams using Microsoft Graph + +With Microsoft Graph, you can migrate users' existing message history and data from an external system into a Teams channel. By enabling the recreation of a third-party platform messaging hierarchy inside Teams, users can continue their communications in a seamless manner and proceed without interruption. + +> [!NOTE] +> In the future, Microsoft may require you or your customers to pay additional fees based on the amount of data imported. + +## API Migration Workflow +Use the step-by-step migration flow to ensure a seamless transition of historical messages in both existing and newly created channels or chats by enabling migration mode. \ No newline at end of file From 46ee76d742c0c36a040074a5f03959830cd97170 Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Fri, 1 Aug 2025 19:19:59 +0530 Subject: [PATCH 02/30] updated Note and changed errors for language accuracy --- .../new-draft-external-messages-to-teams.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md index 736c8786330..4147d57d8c8 100644 --- a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md @@ -1,10 +1,18 @@ -## Import third-party platform messages to Teams using Microsoft Graph +# Import third-party platform messages to Teams using Microsoft Graph -With Microsoft Graph, you can migrate users' existing message history and data from an external system into a Teams channel. By enabling the recreation of a third-party platform messaging hierarchy inside Teams, users can continue their communications in a seamless manner and proceed without interruption. +With Microsoft Graph, you can migrate users' existing message history and data from an external system into a Teams channel. Users can continue their communications in a seamless manner and proceed without interruption through the recreation of a third-party platform messaging hierarchy inside Teams. > [!NOTE] -> In the future, Microsoft may require you or your customers to pay additional fees based on the amount of data imported. +> In the future, Microsoft may require you or your customers to pay extra fees based on the amount of data imported. ## API Migration Workflow -Use the step-by-step migration flow to ensure a seamless transition of historical messages in both existing and newly created channels or chats by enabling migration mode. \ No newline at end of file +Use the step-by-step migration flow to ensure a seamless transition of historical messages in both existing and newly created channels or chats by enabling migration mode. + +## Step-by-Step Migration Flow +### Step 1: Create or select a channel/chat +You can either create a new channel or chat in a Team or use an existing channel or chat. + +> [!NOTE] +> All APIs listed in the following sections require the `Teamswork.Migrate.All` permission in the application context. Delegated authentication isn't supported. + From 534e1403995763279eedfa81413851fb626efacf Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Fri, 1 Aug 2025 19:59:14 +0530 Subject: [PATCH 03/30] Added Note and Step 2 --- .../new-draft-external-messages-to-teams.md | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md index 4147d57d8c8..4f2adaf5b41 100644 --- a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md @@ -1,7 +1,7 @@ -# Import third-party platform messages to Teams using Microsoft Graph +# Use Microsoft Graph to Import Messages from External Platforms to Teams -With Microsoft Graph, you can migrate users' existing message history and data from an external system into a Teams channel. Users can continue their communications in a seamless manner and proceed without interruption through the recreation of a third-party platform messaging hierarchy inside Teams. +You can use Microsoft Graph to migrate users' existing message history and data from an external system into a Teams channel. This enables users to continue conversations without interruption by recreating the messaging hierarchy from a third-party platform directly within Teams. > [!NOTE] > In the future, Microsoft may require you or your customers to pay extra fees based on the amount of data imported. @@ -11,8 +11,32 @@ Use the step-by-step migration flow to ensure a seamless transition of historica ## Step-by-Step Migration Flow ### Step 1: Create or select a channel/chat -You can either create a new channel or chat in a Team or use an existing channel or chat. +You can either create a new channel or chat in a Team or use an existing channel or chat. hyperlink > [!NOTE] > All APIs listed in the following sections require the `Teamswork.Migrate.All` permission in the application context. Delegated authentication isn't supported. +### Step 2: Use startMigration API to start channel migration +* The startMigration API enables migration mode on existing Teams channels, allowing import of historical messages. Previously, import operations were restricted to newly created standard channels in an empty state. Refer [Import third-party platform messages to Teams using Microsoft Graph](#https://learn.microsoft.com/en-us/microsoftteams/platform/graph-api/import-messages/import-external-messages-to-teams). + +* You can define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel’s current createdDateTime and will replace it during migration. + +* Supported Channels: Existing Shared, Private and Public + +#### HTTP Request + +```http +POST /teams/{team-id}/channels/{channel-id}/startMigration +{ + INSERT ACTUAL CODE +} +``` +> [!NOTE] +> * You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. +> * If no request body is provided, the API uses the current date and time as the minimum timestamp. +You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. +> * If no request body is provided, the API uses the current date and time as the minimum timestamp. +> - `ConversationCreationDateTime` must be: +> - Greater than the minimum value for `DateTimeOffset`. +> - Less than the current value of the channel's `CreatedDateTime`. + From 71180f276f39094b91044b4ce312badf2ecb47e6 Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Fri, 1 Aug 2025 20:12:04 +0530 Subject: [PATCH 04/30] made corrections with Acrolinx --- .../new-draft-external-messages-to-teams.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md index 4f2adaf5b41..b5c99609573 100644 --- a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md @@ -1,29 +1,27 @@ # Use Microsoft Graph to Import Messages from External Platforms to Teams -You can use Microsoft Graph to migrate users' existing message history and data from an external system into a Teams channel. This enables users to continue conversations without interruption by recreating the messaging hierarchy from a third-party platform directly within Teams. +You can use Microsoft Graph to migrate users' existing message history and data from an external system into a Teams channel. This feature enables users to continue conversations without interruption by recreating the messaging hierarchy from a third-party platform directly within Teams. > [!NOTE] -> In the future, Microsoft may require you or your customers to pay extra fees based on the amount of data imported. +> In the future, Microsoft might require you or your customers to pay extra fees based on the amount of data imported. ## API Migration Workflow Use the step-by-step migration flow to ensure a seamless transition of historical messages in both existing and newly created channels or chats by enabling migration mode. ## Step-by-Step Migration Flow ### Step 1: Create or select a channel/chat -You can either create a new channel or chat in a Team or use an existing channel or chat. hyperlink +You can either create a new channel or chat in a Team or use an existing channel or chat. Hyperlink > [!NOTE] > All APIs listed in the following sections require the `Teamswork.Migrate.All` permission in the application context. Delegated authentication isn't supported. ### Step 2: Use startMigration API to start channel migration -* The startMigration API enables migration mode on existing Teams channels, allowing import of historical messages. Previously, import operations were restricted to newly created standard channels in an empty state. Refer [Import third-party platform messages to Teams using Microsoft Graph](#https://learn.microsoft.com/en-us/microsoftteams/platform/graph-api/import-messages/import-external-messages-to-teams). +The startMigration API enables migration mode on existing Teams channels, allowing import of historical messages. Previously, import operations were restricted to newly created standard channels in an empty state. Refer [Import third-party platform messages to Teams using Microsoft Graph](#https://learn.microsoft.com/en-us/microsoftteams/platform/graph-api/import-messages/import-external-messages-to-teams). -* You can define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel’s current createdDateTime and will replace it during migration. +* You can define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel’s current createdDateTime and replaces it during migration. The supported channels are all the existing Shared, Private, and Public channels. You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. -* Supported Channels: Existing Shared, Private and Public - -#### HTTP Request +#### Request ```http POST /teams/{team-id}/channels/{channel-id}/startMigration @@ -32,7 +30,6 @@ POST /teams/{team-id}/channels/{channel-id}/startMigration } ``` > [!NOTE] -> * You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. > * If no request body is provided, the API uses the current date and time as the minimum timestamp. You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. > * If no request body is provided, the API uses the current date and time as the minimum timestamp. From 0c9be997eeaeae131ea5a140d211cf97dd891b5d Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Fri, 1 Aug 2025 20:23:45 +0530 Subject: [PATCH 05/30] Added Title --- .../new-draft-external-messages-to-teams.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md index b5c99609573..3f81d809dcb 100644 --- a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md @@ -1,6 +1,15 @@ -# Use Microsoft Graph to Import Messages from External Platforms to Teams +--- +title: Import External Platform Messages Using Microsoft Graph +description: Learn how to use Microsoft Graph APIs to import historical messages and data from an third-party platform to Teams. +ms.localizationpriority: high +author: "akjo" +ms.topic: overview +ms.owner: +ms.date: 01/08/2025 +--- +# Use Microsoft Graph to Import Messages from External Platforms to Teams You can use Microsoft Graph to migrate users' existing message history and data from an external system into a Teams channel. This feature enables users to continue conversations without interruption by recreating the messaging hierarchy from a third-party platform directly within Teams. > [!NOTE] @@ -26,7 +35,7 @@ The startMigration API enables migration mode on existing Teams channels, allowi ```http POST /teams/{team-id}/channels/{channel-id}/startMigration { - INSERT ACTUAL CODE + ACTUAL CODE } ``` > [!NOTE] From e8daf736688afde0edd901994acc3701a4d8d450 Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Fri, 1 Aug 2025 20:38:06 +0530 Subject: [PATCH 06/30] Made corrections to Title and content --- .../new-draft-external-messages-to-teams.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md index 3f81d809dcb..89880fe3e49 100644 --- a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md @@ -1,16 +1,15 @@ - --- -title: Import External Platform Messages Using Microsoft Graph -description: Learn how to use Microsoft Graph APIs to import historical messages and data from an third-party platform to Teams. +title: Import External Platform Messages Using Microsoft Graphs +description: Learn how to use Microsoft Graph to import historical messages and data from all third-party platforms to Teams. ms.localizationpriority: high -author: "akjo" +author: "nehahedau" ms.topic: overview -ms.owner: +ms.owner: TBD ms.date: 01/08/2025 --- # Use Microsoft Graph to Import Messages from External Platforms to Teams -You can use Microsoft Graph to migrate users' existing message history and data from an external system into a Teams channel. This feature enables users to continue conversations without interruption by recreating the messaging hierarchy from a third-party platform directly within Teams. +You can use Microsoft Graph to migrate users' existing message history and data from an external system into a Teams channel. This feature enables users to continue conversations without interruption, by recreating the messaging hierarchy from a third-party platform directly within Teams. > [!NOTE] > In the future, Microsoft might require you or your customers to pay extra fees based on the amount of data imported. @@ -20,13 +19,13 @@ Use the step-by-step migration flow to ensure a seamless transition of historica ## Step-by-Step Migration Flow ### Step 1: Create or select a channel/chat -You can either create a new channel or chat in a Team or use an existing channel or chat. Hyperlink +You can either create a new channel or chat in a Team or use an existing channel or chat. [Insert Hyperlink or cross-reference to existing steps]() > [!NOTE] > All APIs listed in the following sections require the `Teamswork.Migrate.All` permission in the application context. Delegated authentication isn't supported. ### Step 2: Use startMigration API to start channel migration -The startMigration API enables migration mode on existing Teams channels, allowing import of historical messages. Previously, import operations were restricted to newly created standard channels in an empty state. Refer [Import third-party platform messages to Teams using Microsoft Graph](#https://learn.microsoft.com/en-us/microsoftteams/platform/graph-api/import-messages/import-external-messages-to-teams). +* You can use the startMigration API, which enables migration mode on existing Teams channels, allowing import of historical messages. Previously, import operations were restricted to newly created standard channels in an empty state. Refer [Import third-party platform messages to Teams using Microsoft Graph](#https://learn.microsoft.com/en-us/microsoftteams/platform/graph-api/import-messages/import-external-messages-to-teams). * You can define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel’s current createdDateTime and replaces it during migration. The supported channels are all the existing Shared, Private, and Public channels. You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. From 5cd4c6e32927fd8458de7428a3227e181df6b910 Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Mon, 4 Aug 2025 22:11:30 +0530 Subject: [PATCH 07/30] Fixed errors and resolved issues --- .../new-draft-external-messages-to-teams.md | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md index 89880fe3e49..a511db736bc 100644 --- a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md @@ -9,23 +9,28 @@ ms.date: 01/08/2025 --- # Use Microsoft Graph to Import Messages from External Platforms to Teams + You can use Microsoft Graph to migrate users' existing message history and data from an external system into a Teams channel. This feature enables users to continue conversations without interruption, by recreating the messaging hierarchy from a third-party platform directly within Teams. > [!NOTE] > In the future, Microsoft might require you or your customers to pay extra fees based on the amount of data imported. ## API Migration Workflow + Use the step-by-step migration flow to ensure a seamless transition of historical messages in both existing and newly created channels or chats by enabling migration mode. ## Step-by-Step Migration Flow + ### Step 1: Create or select a channel/chat -You can either create a new channel or chat in a Team or use an existing channel or chat. [Insert Hyperlink or cross-reference to existing steps]() + +You can either create a new channel or chat in a Team or use an existing channel or chat. > [!NOTE] > All APIs listed in the following sections require the `Teamswork.Migrate.All` permission in the application context. Delegated authentication isn't supported. -### Step 2: Use startMigration API to start channel migration -* You can use the startMigration API, which enables migration mode on existing Teams channels, allowing import of historical messages. Previously, import operations were restricted to newly created standard channels in an empty state. Refer [Import third-party platform messages to Teams using Microsoft Graph](#https://learn.microsoft.com/en-us/microsoftteams/platform/graph-api/import-messages/import-external-messages-to-teams). +### Step 2: Use startMigration API to start channel migration + +* You can use the startMigration API, which enables migration mode on existing Teams channels, allowing import of historical messages. Previously, import operations were restricted to newly created standard channels in an empty state. Refer [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md) * You can define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel’s current createdDateTime and replaces it during migration. The supported channels are all the existing Shared, Private, and Public channels. You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. @@ -37,11 +42,11 @@ POST /teams/{team-id}/channels/{channel-id}/startMigration ACTUAL CODE } ``` + > [!NOTE] +> +> * You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. > * If no request body is provided, the API uses the current date and time as the minimum timestamp. -You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. -> * If no request body is provided, the API uses the current date and time as the minimum timestamp. -> - `ConversationCreationDateTime` must be: -> - Greater than the minimum value for `DateTimeOffset`. -> - Less than the current value of the channel's `CreatedDateTime`. - +> * `ConversationCreationDateTime` must be: +> * Greater than the minimum value for `DateTimeOffset`. +> * Less than the current value of the channel's `CreatedDateTime`. From 9ff77d1d699ccec08bcbdc77c936fa789fbfb562 Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Mon, 4 Aug 2025 22:30:41 +0530 Subject: [PATCH 08/30] changed author --- .../import-messages/new-draft-external-messages-to-teams.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md index a511db736bc..1d0ff11695a 100644 --- a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md @@ -2,7 +2,7 @@ title: Import External Platform Messages Using Microsoft Graphs description: Learn how to use Microsoft Graph to import historical messages and data from all third-party platforms to Teams. ms.localizationpriority: high -author: "nehahedau" +author: "surbhigupta" ms.topic: overview ms.owner: TBD ms.date: 01/08/2025 From 7764410251fb0b604728266e5113ccf715c0215d Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Wed, 6 Aug 2025 23:14:06 +0530 Subject: [PATCH 09/30] Update new-draft-external-messages-to-teams.md --- .../new-draft-external-messages-to-teams.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md index 1d0ff11695a..8cfbbb66a4d 100644 --- a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md @@ -23,12 +23,16 @@ Use the step-by-step migration flow to ensure a seamless transition of historica ### Step 1: Create or select a channel/chat +Namespace: microsoft.graph + You can either create a new channel or chat in a Team or use an existing channel or chat. > [!NOTE] > All APIs listed in the following sections require the `Teamswork.Migrate.All` permission in the application context. Delegated authentication isn't supported. -### Step 2: Use startMigration API to start channel migration +### Step 2: Use startMigration API to start channel and chat migration + +#### Channel Migration * You can use the startMigration API, which enables migration mode on existing Teams channels, allowing import of historical messages. Previously, import operations were restricted to newly created standard channels in an empty state. Refer [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md) @@ -40,13 +44,15 @@ You can either create a new channel or chat in a Team or use an existing channel POST /teams/{team-id}/channels/{channel-id}/startMigration { ACTUAL CODE +"conversationCreationDateTime": "2024-01-01T00:00:00Z" } ``` > [!NOTE] > -> * You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. > * If no request body is provided, the API uses the current date and time as the minimum timestamp. -> * `ConversationCreationDateTime` must be: +> * `conversationCreationDateTime` must be: > * Greater than the minimum value for `DateTimeOffset`. > * Less than the current value of the channel's `CreatedDateTime`. + +#### Chat Migration From d951009c96af27a1300e91fe1a5a6120a22bf9cb Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Thu, 7 Aug 2025 08:59:13 +0530 Subject: [PATCH 10/30] Updated the content for chat migration Reorganized content to include the startMigration Api for both channels and chats as step1 --- .../new-draft-external-messages-to-teams.md | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md index 8cfbbb66a4d..388c026de24 100644 --- a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md @@ -32,15 +32,17 @@ You can either create a new channel or chat in a Team or use an existing channel ### Step 2: Use startMigration API to start channel and chat migration -#### Channel Migration +* Use the startMigration API, to enable migration mode on existing Teams channels/chats, and allow import of historical messages. Previously, import operations were restricted to newly created standard channels and chats in an empty state. Refer [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md) + +* Define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel or chat’s current createdDateTime and replaces it during migration. -* You can use the startMigration API, which enables migration mode on existing Teams channels, allowing import of historical messages. Previously, import operations were restricted to newly created standard channels in an empty state. Refer [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md) +#### Channel Migration -* You can define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel’s current createdDateTime and replaces it during migration. The supported channels are all the existing Shared, Private, and Public channels. You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. +* The supported channels are all the existing Shared, Private, and Public channels. You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. -#### Request +#### Channel Request -```http +```https POST /teams/{team-id}/channels/{channel-id}/startMigration { ACTUAL CODE @@ -48,11 +50,28 @@ POST /teams/{team-id}/channels/{channel-id}/startMigration } ``` +#### Chat Migration + +* The supported chat types include Group chats and One-on-one (1:1) chats. **Meeting chats are not supported. External members are supported in all applicable chat types.** +* The startMigration API initiates the message migration process by setting the migrationMode property to **inProgress** for a specified chat. + +#### Chat Request + +```https +POST /chats/{chat-id}/startMigration +{ + ACTUAL CODE +"conversationCreationDateTime": "2024-01-01T00:00:00Z" +} +``` + +#### Channel and Chat Response + +For both channels and chats, if the request is successful, the method returns a **204 No Content** status code. The response body is empty. + > [!NOTE] > > * If no request body is provided, the API uses the current date and time as the minimum timestamp. > * `conversationCreationDateTime` must be: > * Greater than the minimum value for `DateTimeOffset`. > * Less than the current value of the channel's `CreatedDateTime`. - -#### Chat Migration From 92871b35b2ef5e875758ab0b65311b4c59222bda Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Thu, 7 Aug 2025 15:09:51 +0530 Subject: [PATCH 11/30] Added Example --- .../new-draft-external-messages-to-teams.md | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md index 388c026de24..148ef22903c 100644 --- a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md @@ -21,7 +21,7 @@ Use the step-by-step migration flow to ensure a seamless transition of historica ## Step-by-Step Migration Flow -### Step 1: Create or select a channel/chat +1. ### Create or select a channel/chat Namespace: microsoft.graph @@ -30,7 +30,7 @@ You can either create a new channel or chat in a Team or use an existing channel > [!NOTE] > All APIs listed in the following sections require the `Teamswork.Migrate.All` permission in the application context. Delegated authentication isn't supported. -### Step 2: Use startMigration API to start channel and chat migration +2. ### Use startMigration API to start channel and chat migration * Use the startMigration API, to enable migration mode on existing Teams channels/chats, and allow import of historical messages. Previously, import operations were restricted to newly created standard channels and chats in an empty state. Refer [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md) @@ -42,10 +42,10 @@ You can either create a new channel or chat in a Team or use an existing channel #### Channel Request -```https +```HTTP POST /teams/{team-id}/channels/{channel-id}/startMigration { - ACTUAL CODE + "conversationCreationDateTime": "2024-01-01T00:00:00Z" } ``` @@ -57,10 +57,10 @@ POST /teams/{team-id}/channels/{channel-id}/startMigration #### Chat Request -```https +```HTTP POST /chats/{chat-id}/startMigration { - ACTUAL CODE + "conversationCreationDateTime": "2024-01-01T00:00:00Z" } ``` @@ -69,9 +69,28 @@ POST /chats/{chat-id}/startMigration For both channels and chats, if the request is successful, the method returns a **204 No Content** status code. The response body is empty. +**Example of a request**: + +```HTTP +POST https://graph.microsoft.com/beta/teams/57fb72d0-d811-46f4-8947-305e6072eaa5/channels/19:4b6bed8d24574f6a9e436813cb2617d8@thread.tacv2/startMigration + +{ +“conversationCreationDateTime”: “2024-01-01T00:00:00Z” +} +``` + +Response of the request: +**HTTP/1.1 204 No Content** + > [!NOTE] > > * If no request body is provided, the API uses the current date and time as the minimum timestamp. > * `conversationCreationDateTime` must be: > * Greater than the minimum value for `DateTimeOffset`. -> * Less than the current value of the channel's `CreatedDateTime`. +> * Less than the current value of the channel or chat's `CreatedDateTime`. + +3. Call the **GET /channel/chat API** to confirm that the **migrationMode** property is set to **inProgress**, after completing step 2. + +4. ### Import messages using POST API + +Go to [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md) and use the POST API, to begin sending back-in-time messages. From 25afb264eadb4b88c6318beb9b62728a70daa1d8 Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Thu, 7 Aug 2025 22:58:59 +0530 Subject: [PATCH 12/30] Added content for completing chat and channel migration --- .../new-draft-external-messages-to-teams.md | 64 +++++++++++++++++-- 1 file changed, 59 insertions(+), 5 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md index 148ef22903c..16cafe9fbf2 100644 --- a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md @@ -36,11 +36,11 @@ You can either create a new channel or chat in a Team or use an existing channel * Define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel or chat’s current createdDateTime and replaces it during migration. -#### Channel Migration +#### Channel migration * The supported channels are all the existing Shared, Private, and Public channels. You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. -#### Channel Request +#### Channel request ```HTTP POST /teams/{team-id}/channels/{channel-id}/startMigration @@ -50,12 +50,12 @@ POST /teams/{team-id}/channels/{channel-id}/startMigration } ``` -#### Chat Migration +#### Chat migration * The supported chat types include Group chats and One-on-one (1:1) chats. **Meeting chats are not supported. External members are supported in all applicable chat types.** * The startMigration API initiates the message migration process by setting the migrationMode property to **inProgress** for a specified chat. -#### Chat Request +#### Chat request ```HTTP POST /chats/{chat-id}/startMigration @@ -65,7 +65,7 @@ POST /chats/{chat-id}/startMigration } ``` -#### Channel and Chat Response +#### Channel and Chat response For both channels and chats, if the request is successful, the method returns a **204 No Content** status code. The response body is empty. @@ -94,3 +94,57 @@ Response of the request: 4. ### Import messages using POST API Go to [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md) and use the POST API, to begin sending back-in-time messages. + +5. ### Complete channel and chat migration + +Namespace: microsoft.graph + +Use the **completeMigration** API to finish the migration process for both new and existing channels and chats. Previously, this operation was limited to newly created Standard channels and chats initiated for the initial migration flow. + +#### Complete Channel Migration + +* When a channel is created in migration mode for the initial import flow, calling the **completeMigration** API updates the migrationMode property to completed. **This change is permanent and marks the channel as fully migrated.** +* After calling completeMigration, you can still import extra messages by using the startMigration API. + +#### Request for Completing Channel Migration + +```HTTP +POST /teams/{team-id}/channels/{channel-id}/completeMigration +``` + +#### Complete Chat Migration + +* For existing chats already in migration mode, call the **completeMigration** API to update the migrationMode property to completed. **This marks the chat as fully migrated.** +* After calling completeMigration on a new or existing chat, you can continue importing messages by using the startMigration API. + +#### Request for Completing Chat Migration + +```HTTP +POST /chats/{chat-id}/completeMigration +``` + +> [!IMPORTANT] +> Don't include a request body when calling this method for channels or chats. If the request is successful, the method returns a 204 No Content status code. The response body is empty. +> +> [!NOTE] +> +> In Migration Mode: +> +> * Certain operations such as sending messages and adding members are restricted. +> * Calling the completeMigration API means that channel or chat migration is complete and normal operations can resume. + +#### Supported channel or chat types + +|Entity Type |Sub Type |Migration Mode Support |Notes| +|---------|---------|---------|---------| +|**Channels** | General, Standard, Private, Shared | New and existing | Must be created or already in migration mode | +|**Chats** | Group, One-on-one (1:1) | New and existing | Meeting chats not supported; external members supported | + +6. Call the GET /channel/chat API to verify that the migrationMode property is marked as **completed**. + +## See also + +* [Microsoft Graph and Teams integration](/graph/teams-concept-overview) +* [Export content with the Microsoft Teams Export APIs](/microsoftteams/export-teams-content) +* [Microsoft Teams service limits](/graph/throttling-limits#microsoft-teams-service-limits) +* [Licensing and payment requirements for the Microsoft Teams API](/graph/teams-licenses) From 2775fd252aab7da17b104a07c07668e79c09a2b2 Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Fri, 29 Aug 2025 07:17:04 +0530 Subject: [PATCH 13/30] incorporated internal review changes --- .../new-draft-external-messages-to-teams.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md index 16cafe9fbf2..1f3f2b444a9 100644 --- a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md @@ -10,7 +10,7 @@ ms.date: 01/08/2025 # Use Microsoft Graph to Import Messages from External Platforms to Teams -You can use Microsoft Graph to migrate users' existing message history and data from an external system into a Teams channel. This feature enables users to continue conversations without interruption, by recreating the messaging hierarchy from a third-party platform directly within Teams. +You can use Microsoft Graph to migrate existing message history and data from an external system into a Teams channel. This feature enables users to continue conversations without interruption, by recreating the messaging hierarchy from a third-party platform directly within Teams. > [!NOTE] > In the future, Microsoft might require you or your customers to pay extra fees based on the amount of data imported. @@ -21,7 +21,7 @@ Use the step-by-step migration flow to ensure a seamless transition of historica ## Step-by-Step Migration Flow -1. ### Create or select a channel/chat +### 1. Create or select a channel/chat Namespace: microsoft.graph @@ -30,7 +30,7 @@ You can either create a new channel or chat in a Team or use an existing channel > [!NOTE] > All APIs listed in the following sections require the `Teamswork.Migrate.All` permission in the application context. Delegated authentication isn't supported. -2. ### Use startMigration API to start channel and chat migration +### 2. Use startMigration API to start channel and chat migration * Use the startMigration API, to enable migration mode on existing Teams channels/chats, and allow import of historical messages. Previously, import operations were restricted to newly created standard channels and chats in an empty state. Refer [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md) @@ -89,13 +89,13 @@ Response of the request: > * Greater than the minimum value for `DateTimeOffset`. > * Less than the current value of the channel or chat's `CreatedDateTime`. -3. Call the **GET /channel/chat API** to confirm that the **migrationMode** property is set to **inProgress**, after completing step 2. +### 3. Call the GET /channel/chat API to confirm that the **migrationMode** property is set to **inProgress**, after completing step 2 -4. ### Import messages using POST API +### 4. Import messages using POST API Go to [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md) and use the POST API, to begin sending back-in-time messages. -5. ### Complete channel and chat migration +### 5. Complete channel and chat migration Namespace: microsoft.graph From 616767e33dbf5a529d31ab05686e9e096d502cb0 Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Fri, 29 Aug 2025 07:38:40 +0530 Subject: [PATCH 14/30] added second-level headings --- .../new-draft-external-messages-to-teams.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md index 1f3f2b444a9..b3b72c05d3e 100644 --- a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md @@ -36,7 +36,7 @@ You can either create a new channel or chat in a Team or use an existing channel * Define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel or chat’s current createdDateTime and replaces it during migration. -#### Channel migration +#### 2.1 Channel migration * The supported channels are all the existing Shared, Private, and Public channels. You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. @@ -50,7 +50,7 @@ POST /teams/{team-id}/channels/{channel-id}/startMigration } ``` -#### Chat migration +#### 2.2 Chat migration * The supported chat types include Group chats and One-on-one (1:1) chats. **Meeting chats are not supported. External members are supported in all applicable chat types.** * The startMigration API initiates the message migration process by setting the migrationMode property to **inProgress** for a specified chat. @@ -101,7 +101,7 @@ Namespace: microsoft.graph Use the **completeMigration** API to finish the migration process for both new and existing channels and chats. Previously, this operation was limited to newly created Standard channels and chats initiated for the initial migration flow. -#### Complete Channel Migration +#### 5.1 Complete Channel Migration * When a channel is created in migration mode for the initial import flow, calling the **completeMigration** API updates the migrationMode property to completed. **This change is permanent and marks the channel as fully migrated.** * After calling completeMigration, you can still import extra messages by using the startMigration API. @@ -112,7 +112,7 @@ Use the **completeMigration** API to finish the migration process for both new a POST /teams/{team-id}/channels/{channel-id}/completeMigration ``` -#### Complete Chat Migration +#### 5.2 Complete Chat Migration * For existing chats already in migration mode, call the **completeMigration** API to update the migrationMode property to completed. **This marks the chat as fully migrated.** * After calling completeMigration on a new or existing chat, you can continue importing messages by using the startMigration API. @@ -140,7 +140,7 @@ POST /chats/{chat-id}/completeMigration |**Channels** | General, Standard, Private, Shared | New and existing | Must be created or already in migration mode | |**Chats** | Group, One-on-one (1:1) | New and existing | Meeting chats not supported; external members supported | -6. Call the GET /channel/chat API to verify that the migrationMode property is marked as **completed**. +### 6. Call the GET /channel/chat API to verify that the migrationMode property is marked as **completed** ## See also From 970f339f44fd3f15f51501e1c7226edfdc3ca3d8 Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Fri, 29 Aug 2025 07:46:00 +0530 Subject: [PATCH 15/30] saved file --- .../import-messages/import-external-messages-to-teams.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/import-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/import-external-messages-to-teams.md index fafd2dbb3c3..0c4061cf885 100644 --- a/msteams-platform/graph-api/import-messages/import-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/import-external-messages-to-teams.md @@ -93,7 +93,6 @@ You can receive the error message in the following scenarios: > [!div class="nextstepaction"] > [I ran into an issue](https://github.com/MicrosoftDocs/msteams-docs/issues/new?template=Doc-Feedback.yaml&title=%5BI+ran+into+an+issue%5D+Step+1%3A+Create+a+team&&author=%40AkJo&pageUrl=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fgraph-api%2Fimport-messages%2Fimport-external-messages-to-teams%23step-1-create-a-team&contentSourceUrl=https%3A%2F%2Fgithub.com%2FMicrosoftDocs%2Fmsteams-docs%2Fblob%2Fmain%2Fmsteams-platform%2Fgraph-api%2Fimport-messages%2Fimport-external-messages-to-teams.md&documentVersionIndependentId=ce77e760-90cf-e6b1-3cec-ae55ee50c33e&platformId=c9cc8ad3-6c28-7c8c-af03-219bbefa1d38&metadata=*%2BID%253A%2Be473e1f3-69f5-bcfa-bcab-54b098b59c80%2B%250A*%2BService%253A%2B%2A%2Amsteams%2A%2A) - ## Step 2: Create a channel Creating a channel for the imported messages is similar to the create team scenario: @@ -296,6 +295,7 @@ HTTP/1.1 200 OK "reactions": [] } ``` + > [!div class="nextstepaction"] > [I ran into an issue](https://github.com/MicrosoftDocs/msteams-docs/issues/new?template=Doc-Feedback.yaml&title=%5BI+ran+into+an+issue%5D+Step+3%3A+Import+messages&&author=%40AkJo&pageUrl=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fgraph-api%2Fimport-messages%2Fimport-external-messages-to-teams%23step-3-import-messages&contentSourceUrl=https%3A%2F%2Fgithub.com%2FMicrosoftDocs%2Fmsteams-docs%2Fblob%2Fmain%2Fmsteams-platform%2Fgraph-api%2Fimport-messages%2Fimport-external-messages-to-teams.md&documentVersionIndependentId=ce77e760-90cf-e6b1-3cec-ae55ee50c33e&platformId=c9cc8ad3-6c28-7c8c-af03-219bbefa1d38&metadata=*%2BID%253A%2Be473e1f3-69f5-bcfa-bcab-54b098b59c80%2B%250A*%2BService%253A%2B%2A%2Amsteams%2A%2A) @@ -332,7 +332,6 @@ Action called on a `team` or `channel` that isn't in `migrationMode`. > [!div class="nextstepaction"] > [I ran into an issue](https://github.com/MicrosoftDocs/msteams-docs/issues/new?template=Doc-Feedback.yaml&title=%5BI+ran+into+an+issue%5D+Step+4%3A+Complete+migration+mode&&author=%40AkJo&pageUrl=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fgraph-api%2Fimport-messages%2Fimport-external-messages-to-teams%23step-4-complete-migration-mode&contentSourceUrl=https%3A%2F%2Fgithub.com%2FMicrosoftDocs%2Fmsteams-docs%2Fblob%2Fmain%2Fmsteams-platform%2Fgraph-api%2Fimport-messages%2Fimport-external-messages-to-teams.md&documentVersionIndependentId=ce77e760-90cf-e6b1-3cec-ae55ee50c33e&platformId=c9cc8ad3-6c28-7c8c-af03-219bbefa1d38&metadata=*%2BID%253A%2Be473e1f3-69f5-bcfa-bcab-54b098b59c80%2B%250A*%2BService%253A%2B%2A%2Amsteams%2A%2A) - ## Step five: Add team members You can add a member to a team [using the Teams UI](https://support.microsoft.com/office/add-members-to-a-team-in-teams-aff2249d-b456-4bc3-81e7-52327b6b38e9) or Microsoft Graph [add member](/graph/api/group-post-members?view=graph-rest-beta&tabs=http&preserve-view=true) API: @@ -376,7 +375,6 @@ HTTP/1.1 204 No Content > [!NOTE] > Inline images are the only type of media supported by the import message API schema. - ##### Import content scope The following table provides the content scope: @@ -396,7 +394,6 @@ The following table provides the content scope: ||Cross posts between channels| ||Shared channels| - ## See also * [Microsoft Graph and Teams integration](/graph/teams-concept-overview) From eb4476d0fbf88aec35050f43b9fe5e36a8efa397 Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Thu, 25 Sep 2025 16:25:56 +0530 Subject: [PATCH 16/30] changes in draft --- .../new-draft-external-messages-to-teams.md | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md index b3b72c05d3e..d8f11d8502f 100644 --- a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md @@ -8,31 +8,34 @@ ms.owner: TBD ms.date: 01/08/2025 --- -# Use Microsoft Graph to Import Messages from External Platforms to Teams +# Import messages from external Platforms to Teams through Microsoft Graph -You can use Microsoft Graph to migrate existing message history and data from an external system into a Teams channel. This feature enables users to continue conversations without interruption, by recreating the messaging hierarchy from a third-party platform directly within Teams. +Use Microsoft Graph to migrate users' existing message history and data from an external system into Teams. Users can continue their conversations seamlessly without interruption, by recreating the messaging hierarchy from a third-party platform directly within Teams. > [!NOTE] -> In the future, Microsoft might require you or your customers to pay extra fees based on the amount of data imported. +> In future, Microsoft might require you or your customers to pay extra fees based on the amount of data imported. -## API Migration Workflow +## Understand API migration workflow -Use the step-by-step migration flow to ensure a seamless transition of historical messages in both existing and newly created channels or chats by enabling migration mode. +You can ensure a seamless transition of historical messages, in both existing and newly created channels or chats by enabling the migration mode. All the APIs listed in the following table require **Teamswork.Migrate.All** permission in the application context. Delegated authentication isn't supported for these APIs. -## Step-by-Step Migration Flow +Channel APIs -### 1. Create or select a channel/chat +|APIs |Context | +|---------|---------| +|Row1 | | +|Row2 | | +|Row3 | | + +### 1. Create or select a channel or chat Namespace: microsoft.graph You can either create a new channel or chat in a Team or use an existing channel or chat. -> [!NOTE] -> All APIs listed in the following sections require the `Teamswork.Migrate.All` permission in the application context. Delegated authentication isn't supported. - -### 2. Use startMigration API to start channel and chat migration +### 2. Use startMigration API to bring channel and chat into migration mode -* Use the startMigration API, to enable migration mode on existing Teams channels/chats, and allow import of historical messages. Previously, import operations were restricted to newly created standard channels and chats in an empty state. Refer [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md) +* Use the startMigration API, to enable migration mode on existing Teams channels or chats, and allow import of historical messages. Previously, import operations were restricted to newly created standard channels and chats in an empty state. See [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md) * Define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel or chat’s current createdDateTime and replaces it during migration. From c1e3c1effc8468bebc8d456fb1c56cff1974da5a Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Fri, 26 Sep 2025 09:07:55 +0530 Subject: [PATCH 17/30] changes in the content --- .../new-draft-external-messages-to-teams.md | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md index d8f11d8502f..10217aa6cce 100644 --- a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md @@ -4,8 +4,8 @@ description: Learn how to use Microsoft Graph to import historical messages and ms.localizationpriority: high author: "surbhigupta" ms.topic: overview -ms.owner: TBD -ms.date: 01/08/2025 +ms.owner: mehakagarwal +ms.date: 26/09/2025 --- # Import messages from external Platforms to Teams through Microsoft Graph @@ -17,15 +17,19 @@ Use Microsoft Graph to migrate users' existing message history and data from an ## Understand API migration workflow -You can ensure a seamless transition of historical messages, in both existing and newly created channels or chats by enabling the migration mode. All the APIs listed in the following table require **Teamswork.Migrate.All** permission in the application context. Delegated authentication isn't supported for these APIs. +You can ensure a seamless transition of historical messages, in both existing and newly created channels or chats by performing the following steps: -Channel APIs +1. [1. Create or select a channel or chat](#1-create-or-select-a-channel-or-chat) +1. [2. Use startMigration API to bring channel and chat into migration mode](#2-use-startmigration-api-to-bring-channel-and-chat-into-migration-mode) +1. +1. -|APIs |Context | -|---------|---------| -|Row1 | | -|Row2 | | -|Row3 | | +Delegated authentication isn't supported. Permissions required for both channel and chat APIs are tabulated as follows: + +|APIs |Permission required |Auth Type | +|---------|---------|---------| +|startMigration | Teamswork.Migrate.All | Application | +|completeMigration | Teamswork.Migrate.All | Application | ### 1. Create or select a channel or chat @@ -53,9 +57,13 @@ POST /teams/{team-id}/channels/{channel-id}/startMigration } ``` +#### Channel response + +If the request is successful, the method returns a **204 No Content** status code. The response body is empty. + #### 2.2 Chat migration -* The supported chat types include Group chats and One-on-one (1:1) chats. **Meeting chats are not supported. External members are supported in all applicable chat types.** +* The supported chat types include Group chats and One-on-one (1:1) chats. Meeting chats are not supported. External members are supported in all applicable chat types. * The startMigration API initiates the message migration process by setting the migrationMode property to **inProgress** for a specified chat. #### Chat request @@ -68,9 +76,9 @@ POST /chats/{chat-id}/startMigration } ``` -#### Channel and Chat response +#### Chat response -For both channels and chats, if the request is successful, the method returns a **204 No Content** status code. The response body is empty. +If the request is successful, the method returns a **204 No Content** status code. The response body is empty. **Example of a request**: From d1f96dfade558ccbe2621301fd165d58c180c3f0 Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Fri, 26 Sep 2025 13:41:53 +0530 Subject: [PATCH 18/30] renamed file and seperated chat and channel migration APIs --- ...rt-external-platform-messages-to-teams.md} | 44 +++++++++++-------- 1 file changed, 26 insertions(+), 18 deletions(-) rename msteams-platform/graph-api/import-messages/{new-draft-external-messages-to-teams.md => import-external-platform-messages-to-teams.md} (77%) diff --git a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md similarity index 77% rename from msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md rename to msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md index 10217aa6cce..8199fe08dde 100644 --- a/msteams-platform/graph-api/import-messages/new-draft-external-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md @@ -5,7 +5,7 @@ ms.localizationpriority: high author: "surbhigupta" ms.topic: overview ms.owner: mehakagarwal -ms.date: 26/09/2025 +ms.date: 09/26/2025 --- # Import messages from external Platforms to Teams through Microsoft Graph @@ -19,17 +19,14 @@ Use Microsoft Graph to migrate users' existing message history and data from an You can ensure a seamless transition of historical messages, in both existing and newly created channels or chats by performing the following steps: -1. [1. Create or select a channel or chat](#1-create-or-select-a-channel-or-chat) -1. [2. Use startMigration API to bring channel and chat into migration mode](#2-use-startmigration-api-to-bring-channel-and-chat-into-migration-mode) -1. -1. +[1. Create or select a channel or chat](#1-create-or-select-a-channel-or-chat) +[2. Use startMigration API](#2-use-startmigration-api) Delegated authentication isn't supported. Permissions required for both channel and chat APIs are tabulated as follows: -|APIs |Permission required |Auth Type | -|---------|---------|---------| -|startMigration | Teamswork.Migrate.All | Application | -|completeMigration | Teamswork.Migrate.All | Application | +|ScopeName|DisplayName| Type|Entities/APIs covered| +|---------|---------|---------|---------| +| `Teamwork.Migrate.All`| Manage migration to Microsoft Teams | Application-only |`POST /teams`| ### 1. Create or select a channel or chat @@ -37,15 +34,15 @@ Namespace: microsoft.graph You can either create a new channel or chat in a Team or use an existing channel or chat. -### 2. Use startMigration API to bring channel and chat into migration mode +### 2. Use startMigration API -* Use the startMigration API, to enable migration mode on existing Teams channels or chats, and allow import of historical messages. Previously, import operations were restricted to newly created standard channels and chats in an empty state. See [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md) +* Use the `startMigration` API, to enable migration mode on existing Teams channels or chats, and allow import of historical messages. Previously, import operations were restricted to newly created standard channels and chats in an empty state. See [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md). * Define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel or chat’s current createdDateTime and replaces it during migration. #### 2.1 Channel migration -* The supported channels are all the existing Shared, Private, and Public channels. You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. +The supported channels are all the existing Shared, Private, and Public channels. You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. #### Channel request @@ -59,12 +56,24 @@ POST /teams/{team-id}/channels/{channel-id}/startMigration #### Channel response -If the request is successful, the method returns a **204 No Content** status code. The response body is empty. +If the request is successful, the method returns a '204 No Content' status code. The response body is empty. + +Example of a channel request: + +```HTTP +POST https://graph.microsoft.com/beta/teams/57fb72d0-d811-46f4-8947-305e6072eaa5/channels/19:4b6bed8d24574f6a9e436813cb2617d8@thread.tacv2/startMigration +{ +“conversationCreationDateTime”: “2024-01-01T00:00:00Z” +} + +``` + +Response of the request: **HTTP/1.1 204 No Content** #### 2.2 Chat migration * The supported chat types include Group chats and One-on-one (1:1) chats. Meeting chats are not supported. External members are supported in all applicable chat types. -* The startMigration API initiates the message migration process by setting the migrationMode property to **inProgress** for a specified chat. +* The startMigration API initiates the message migration process by setting the migrationMode property to 'inProgress' for a specified chat. #### Chat request @@ -78,9 +87,9 @@ POST /chats/{chat-id}/startMigration #### Chat response -If the request is successful, the method returns a **204 No Content** status code. The response body is empty. +If the request is successful, the method returns a *204 No Content* status code. The response body is empty. -**Example of a request**: +Example of a chat request: ```HTTP POST https://graph.microsoft.com/beta/teams/57fb72d0-d811-46f4-8947-305e6072eaa5/channels/19:4b6bed8d24574f6a9e436813cb2617d8@thread.tacv2/startMigration @@ -90,8 +99,7 @@ POST https://graph.microsoft.com/beta/teams/57fb72d0-d811-46f4-8947-305e6072eaa5 } ``` -Response of the request: -**HTTP/1.1 204 No Content** +Response of the request: **HTTP/1.1 204 No Content** > [!NOTE] > From 734f87ed3086a9035974d33e2890211a9106a70f Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Fri, 26 Sep 2025 14:58:57 +0530 Subject: [PATCH 19/30] Changed Step 3 --- ...ort-external-platform-messages-to-teams.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md index 8199fe08dde..fbf235875cf 100644 --- a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md @@ -21,6 +21,9 @@ You can ensure a seamless transition of historical messages, in both existing an [1. Create or select a channel or chat](#1-create-or-select-a-channel-or-chat) [2. Use startMigration API](#2-use-startmigration-api) +[3. Call the GET API](#3-call-the-get-api) +[4. Import messages using POST API](#4-import-messages-using-post-api) +[6. Call the GET /channel/chat API (#6-call-the-get-channelchat-api-to-verify-that-the-migrationmode-property-is-marked-as-completed) Delegated authentication isn't supported. Permissions required for both channel and chat APIs are tabulated as follows: @@ -32,11 +35,11 @@ Delegated authentication isn't supported. Permissions required for both channel Namespace: microsoft.graph -You can either create a new channel or chat in a Team or use an existing channel or chat. +You can either create a new channel or chat in a Team or use an existing channel or chat, to migrate users' message history from any external application to Teams. ### 2. Use startMigration API -* Use the `startMigration` API, to enable migration mode on existing Teams channels or chats, and allow import of historical messages. Previously, import operations were restricted to newly created standard channels and chats in an empty state. See [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md). +* Use the `startMigration` API, to enable migration mode on Teams channels or chats, and allow import of historical messages. Previously, import operations were restricted to newly created standard channels and chats in an empty state. See [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md). * Define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel or chat’s current createdDateTime and replaces it during migration. @@ -104,11 +107,17 @@ Response of the request: **HTTP/1.1 204 No Content** > [!NOTE] > > * If no request body is provided, the API uses the current date and time as the minimum timestamp. -> * `conversationCreationDateTime` must be: +> `conversationCreationDateTime` must be: > * Greater than the minimum value for `DateTimeOffset`. > * Less than the current value of the channel or chat's `CreatedDateTime`. -### 3. Call the GET /channel/chat API to confirm that the **migrationMode** property is set to **inProgress**, after completing step 2 +### 3. Call the GET API + +After completing Step 2, call the `GET channel` or `GET chat` API to confirm that the *migrationMode* property is set to *inProgress*. For more information see [GET Channel](/graph/api/channel-get?view=graph-rest-1.0&tabs=http) + +```HTTP +GET /teams/{team-id}/channels/{channel-id} +``` ### 4. Import messages using POST API @@ -118,7 +127,7 @@ Go to [Import third-party platform messages to Teams using Microsoft Graph](impo Namespace: microsoft.graph -Use the **completeMigration** API to finish the migration process for both new and existing channels and chats. Previously, this operation was limited to newly created Standard channels and chats initiated for the initial migration flow. +Use the `completeMigration` API to finish the migration process for both new and existing channels and chats. Previously, this operation was limited to newly created Standard channels and chats initiated for the initial migration flow. #### 5.1 Complete Channel Migration From ec8b327f4b3365fca5be603e723c83fb73bd0234 Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Mon, 29 Sep 2025 06:30:43 +0530 Subject: [PATCH 20/30] Changed the numbering and headings --- ...ort-external-platform-messages-to-teams.md | 51 ++++++++++--------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md index fbf235875cf..19ed27ceaf0 100644 --- a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md @@ -8,46 +8,47 @@ ms.owner: mehakagarwal ms.date: 09/26/2025 --- -# Import messages from external Platforms to Teams through Microsoft Graph +# Import external platform messages to Teams via Microsoft Graph Use Microsoft Graph to migrate users' existing message history and data from an external system into Teams. Users can continue their conversations seamlessly without interruption, by recreating the messaging hierarchy from a third-party platform directly within Teams. > [!NOTE] -> In future, Microsoft might require you or your customers to pay extra fees based on the amount of data imported. +> In the future, Microsoft might require you or your customers to pay extra fees based on the amount of data imported. -## Understand API migration workflow +## Understand the API migration workflow You can ensure a seamless transition of historical messages, in both existing and newly created channels or chats by performing the following steps: -[1. Create or select a channel or chat](#1-create-or-select-a-channel-or-chat) -[2. Use startMigration API](#2-use-startmigration-api) -[3. Call the GET API](#3-call-the-get-api) -[4. Import messages using POST API](#4-import-messages-using-post-api) -[6. Call the GET /channel/chat API (#6-call-the-get-channelchat-api-to-verify-that-the-migrationmode-property-is-marked-as-completed) +1. [Create or select an existing channel or chat](#create-or-select-an-existing-channel-or-chat) +1. [Use startMigration API](#use-startmigration-api) +1. [Call GET API to check migrationMode status](#call-get-api-to-check-migrationmode-status) +1. [Import messages using POST API](#import-messages-using-post-api) +1. [Complete channel and chat migration](#complete-channel-and-chat-migration) +1. [Call GET API to verify migrationMode](#call-get-api-to-verify-migrationmode) -Delegated authentication isn't supported. Permissions required for both channel and chat APIs are tabulated as follows: +## Permissions -|ScopeName|DisplayName| Type|Entities/APIs covered| +Delegated authentication isn't supported. + +|ScopeName|DisplayName| Type|APIs covered| |---------|---------|---------|---------| | `Teamwork.Migrate.All`| Manage migration to Microsoft Teams | Application-only |`POST /teams`| -### 1. Create or select a channel or chat - -Namespace: microsoft.graph +## Create or select an existing channel or chat You can either create a new channel or chat in a Team or use an existing channel or chat, to migrate users' message history from any external application to Teams. -### 2. Use startMigration API +## Use startMigration API * Use the `startMigration` API, to enable migration mode on Teams channels or chats, and allow import of historical messages. Previously, import operations were restricted to newly created standard channels and chats in an empty state. See [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md). * Define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel or chat’s current createdDateTime and replaces it during migration. -#### 2.1 Channel migration +### Channel migration The supported channels are all the existing Shared, Private, and Public channels. You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. -#### Channel request +### Channel request ```HTTP POST /teams/{team-id}/channels/{channel-id}/startMigration @@ -57,7 +58,7 @@ POST /teams/{team-id}/channels/{channel-id}/startMigration } ``` -#### Channel response +### Channel response If the request is successful, the method returns a '204 No Content' status code. The response body is empty. @@ -73,7 +74,7 @@ POST https://graph.microsoft.com/beta/teams/57fb72d0-d811-46f4-8947-305e6072eaa5 Response of the request: **HTTP/1.1 204 No Content** -#### 2.2 Chat migration +#### Chat migration * The supported chat types include Group chats and One-on-one (1:1) chats. Meeting chats are not supported. External members are supported in all applicable chat types. * The startMigration API initiates the message migration process by setting the migrationMode property to 'inProgress' for a specified chat. @@ -111,7 +112,7 @@ Response of the request: **HTTP/1.1 204 No Content** > * Greater than the minimum value for `DateTimeOffset`. > * Less than the current value of the channel or chat's `CreatedDateTime`. -### 3. Call the GET API +## Call GET API to check migrationMode status After completing Step 2, call the `GET channel` or `GET chat` API to confirm that the *migrationMode* property is set to *inProgress*. For more information see [GET Channel](/graph/api/channel-get?view=graph-rest-1.0&tabs=http) @@ -119,17 +120,17 @@ After completing Step 2, call the `GET channel` or `GET chat` API to confirm tha GET /teams/{team-id}/channels/{channel-id} ``` -### 4. Import messages using POST API +## Import messages using POST API Go to [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md) and use the POST API, to begin sending back-in-time messages. -### 5. Complete channel and chat migration +## Complete channel and chat migration Namespace: microsoft.graph Use the `completeMigration` API to finish the migration process for both new and existing channels and chats. Previously, this operation was limited to newly created Standard channels and chats initiated for the initial migration flow. -#### 5.1 Complete Channel Migration +### Complete Channel Migration * When a channel is created in migration mode for the initial import flow, calling the **completeMigration** API updates the migrationMode property to completed. **This change is permanent and marks the channel as fully migrated.** * After calling completeMigration, you can still import extra messages by using the startMigration API. @@ -140,7 +141,7 @@ Use the `completeMigration` API to finish the migration process for both new and POST /teams/{team-id}/channels/{channel-id}/completeMigration ``` -#### 5.2 Complete Chat Migration +### Complete Chat Migration * For existing chats already in migration mode, call the **completeMigration** API to update the migrationMode property to completed. **This marks the chat as fully migrated.** * After calling completeMigration on a new or existing chat, you can continue importing messages by using the startMigration API. @@ -168,7 +169,9 @@ POST /chats/{chat-id}/completeMigration |**Channels** | General, Standard, Private, Shared | New and existing | Must be created or already in migration mode | |**Chats** | Group, One-on-one (1:1) | New and existing | Meeting chats not supported; external members supported | -### 6. Call the GET /channel/chat API to verify that the migrationMode property is marked as **completed** +## Call GET API to verify migrationMode + +to verify that the migrationMode property is marked as **completed** ## See also From 7f6dddfc88b3d25bb64725fa32a2a31c75696049 Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Mon, 29 Sep 2025 07:06:57 +0530 Subject: [PATCH 21/30] added permissions and supported channel types Acrolinx fixed --- ...ort-external-platform-messages-to-teams.md | 42 ++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md index 19ed27ceaf0..9a9122519d9 100644 --- a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md @@ -15,18 +15,32 @@ Use Microsoft Graph to migrate users' existing message history and data from an > [!NOTE] > In the future, Microsoft might require you or your customers to pay extra fees based on the amount of data imported. +## Prerequisites + +### Analyze and prepare message data + +* Review the third-party messages to decide what is migrated. +* Extract the selected data from the third-party channel or chat. +* Map the third-party channel or chat structure to the Teams structure. +* Convert imported data into a format that's suitable for migration. + +### Set up your Microsoft 365 tenant + +* Ensure that a Microsoft 365 tenant exists for the import data. For more information on setting up a Microsoft 365 tenancy for Teams, see [prepare your Microsoft 365 tenant](../../concepts/build-and-test/prepare-your-o365-tenant.md). +* Make sure that team members are in Microsoft Entra ID. For more information, see [add a new user](/azure/active-directory/fundamentals/add-users-azure-active-directory) to Microsoft Entra ID. + ## Understand the API migration workflow You can ensure a seamless transition of historical messages, in both existing and newly created channels or chats by performing the following steps: 1. [Create or select an existing channel or chat](#create-or-select-an-existing-channel-or-chat) -1. [Use startMigration API](#use-startmigration-api) +1. [Use startMigration API to import messages](#use-startmigration-api-to-import-messages) 1. [Call GET API to check migrationMode status](#call-get-api-to-check-migrationmode-status) 1. [Import messages using POST API](#import-messages-using-post-api) 1. [Complete channel and chat migration](#complete-channel-and-chat-migration) 1. [Call GET API to verify migrationMode](#call-get-api-to-verify-migrationmode) -## Permissions +### Permissions Delegated authentication isn't supported. @@ -34,11 +48,18 @@ Delegated authentication isn't supported. |---------|---------|---------|---------| | `Teamwork.Migrate.All`| Manage migration to Microsoft Teams | Application-only |`POST /teams`| +### Supported channel or chat types + +|Entities |Sub type |Migration mode Support |Notes| +|---------|---------|---------|---------| +|**Channels** | Standard, Private, Shared | New and existing | Must be created or already in migration mode | +|**Chats** | Group, 1:1 | New and existing | Meeting chats not supported; external members supported | + ## Create or select an existing channel or chat -You can either create a new channel or chat in a Team or use an existing channel or chat, to migrate users' message history from any external application to Teams. +You can create a new channel or chat in a Team, or use an existing one, to migrate users' message history from an external application to Teams. -## Use startMigration API +## Use startMigration API to import messages * Use the `startMigration` API, to enable migration mode on Teams channels or chats, and allow import of historical messages. Previously, import operations were restricted to newly created standard channels and chats in an empty state. See [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md). @@ -76,7 +97,7 @@ Response of the request: **HTTP/1.1 204 No Content** #### Chat migration -* The supported chat types include Group chats and One-on-one (1:1) chats. Meeting chats are not supported. External members are supported in all applicable chat types. +* The supported chat types include Group chats and One-on-one (1:1) chats. Meeting chats aren't supported. External members are supported in all applicable chat types. * The startMigration API initiates the message migration process by setting the migrationMode property to 'inProgress' for a specified chat. #### Chat request @@ -114,7 +135,7 @@ Response of the request: **HTTP/1.1 204 No Content** ## Call GET API to check migrationMode status -After completing Step 2, call the `GET channel` or `GET chat` API to confirm that the *migrationMode* property is set to *inProgress*. For more information see [GET Channel](/graph/api/channel-get?view=graph-rest-1.0&tabs=http) +After completing Step 2, call the `GET channel` or `GET chat` API to confirm that the *migrationMode* property is set to *inProgress*. For more information, see [GET Channel](/graph/api/channel-get?view=graph-rest-1.0&tabs=http) ```HTTP GET /teams/{team-id}/channels/{channel-id} @@ -162,16 +183,9 @@ POST /chats/{chat-id}/completeMigration > * Certain operations such as sending messages and adding members are restricted. > * Calling the completeMigration API means that channel or chat migration is complete and normal operations can resume. -#### Supported channel or chat types - -|Entity Type |Sub Type |Migration Mode Support |Notes| -|---------|---------|---------|---------| -|**Channels** | General, Standard, Private, Shared | New and existing | Must be created or already in migration mode | -|**Chats** | Group, One-on-one (1:1) | New and existing | Meeting chats not supported; external members supported | - ## Call GET API to verify migrationMode -to verify that the migrationMode property is marked as **completed** +To verify that the migrationMode property is marked as **completed** ## See also From 11bd1db6fa4d72f001f6fb19e3380076f37b8e0c Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Mon, 29 Sep 2025 13:10:36 +0530 Subject: [PATCH 22/30] made a tunnel --- ...ort-external-platform-messages-to-teams.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md index 9a9122519d9..6b1434d4b2c 100644 --- a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md @@ -61,15 +61,14 @@ You can create a new channel or chat in a Team, or use an existing one, to migra ## Use startMigration API to import messages -* Use the `startMigration` API, to enable migration mode on Teams channels or chats, and allow import of historical messages. Previously, import operations were restricted to newly created standard channels and chats in an empty state. See [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md). +* Use `startMigration` API, to enable migration mode on Teams channels or chats, and allow import of historical messages. Previously, import operations were restricted to newly created standard channels and chats in an empty state. +* Define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel or chat’s current `createdDateTime` and replaces it during migration. -* Define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel or chat’s current createdDateTime and replaces it during migration. +### [Channel migration](#tab/channelmigration) -### Channel migration +All the Shared, Private, and Public channels are supported. You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. -The supported channels are all the existing Shared, Private, and Public channels. You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. - -### Channel request +#### Channel request ```HTTP POST /teams/{team-id}/channels/{channel-id}/startMigration @@ -79,7 +78,7 @@ POST /teams/{team-id}/channels/{channel-id}/startMigration } ``` -### Channel response +#### Channel response If the request is successful, the method returns a '204 No Content' status code. The response body is empty. @@ -91,14 +90,14 @@ POST https://graph.microsoft.com/beta/teams/57fb72d0-d811-46f4-8947-305e6072eaa5 “conversationCreationDateTime”: “2024-01-01T00:00:00Z” } -``` +Response +HTTP/1.1 204 No Content -Response of the request: **HTTP/1.1 204 No Content** +``` -#### Chat migration +### [Chat migration](#tab/chatmigration) -* The supported chat types include Group chats and One-on-one (1:1) chats. Meeting chats aren't supported. External members are supported in all applicable chat types. -* The startMigration API initiates the message migration process by setting the migrationMode property to 'inProgress' for a specified chat. +* The `startMigration` API initiates the message migration process by setting the migrationMode property to 'inProgress' for a specified chat. #### Chat request @@ -112,7 +111,7 @@ POST /chats/{chat-id}/startMigration #### Chat response -If the request is successful, the method returns a *204 No Content* status code. The response body is empty. +If the request is successful, the method returns a 204 No Content status code. The response body is empty. Example of a chat request: From 37b05a1ab261b3deffd3212bbb2f5b8c14ab6b4e Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Mon, 29 Sep 2025 16:30:00 +0530 Subject: [PATCH 23/30] updated sections and content --- ...ort-external-platform-messages-to-teams.md | 268 ++++++++++++++---- 1 file changed, 212 insertions(+), 56 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md index 6b1434d4b2c..e784df914ce 100644 --- a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md @@ -29,16 +29,16 @@ Use Microsoft Graph to migrate users' existing message history and data from an * Ensure that a Microsoft 365 tenant exists for the import data. For more information on setting up a Microsoft 365 tenancy for Teams, see [prepare your Microsoft 365 tenant](../../concepts/build-and-test/prepare-your-o365-tenant.md). * Make sure that team members are in Microsoft Entra ID. For more information, see [add a new user](/azure/active-directory/fundamentals/add-users-azure-active-directory) to Microsoft Entra ID. -## Understand the API migration workflow +## Understand the migration workflow You can ensure a seamless transition of historical messages, in both existing and newly created channels or chats by performing the following steps: -1. [Create or select an existing channel or chat](#create-or-select-an-existing-channel-or-chat) -1. [Use startMigration API to import messages](#use-startmigration-api-to-import-messages) -1. [Call GET API to check migrationMode status](#call-get-api-to-check-migrationmode-status) -1. [Import messages using POST API](#import-messages-using-post-api) -1. [Complete channel and chat migration](#complete-channel-and-chat-migration) -1. [Call GET API to verify migrationMode](#call-get-api-to-verify-migrationmode) +* [Step 1: Create or select an existing channel or chat](#step-1-create-or-select-an-existing-channel-or-chat) +* [Step 2: Use startMigration API to import messages](#step-2-use-startmigration-api-to-import-messages) +* [Step 3: Call GET API to check migrationMode status](#step-3-call-get-api-to-check-migrationmode-status) +* [Step 4: Import messages using POST API](#step-4-import-messages-using-post-api) +* [Step 5: Complete channel and chat migration](#step-5-complete-channel-and-chat-migration) +* [Step 6: Call GET API to verify migrationMode](#step-6-call-get-api-to-verify-migrationmode) ### Permissions @@ -48,25 +48,25 @@ Delegated authentication isn't supported. |---------|---------|---------|---------| | `Teamwork.Migrate.All`| Manage migration to Microsoft Teams | Application-only |`POST /teams`| -### Supported channel or chat types +### Supported channel and chat types |Entities |Sub type |Migration mode Support |Notes| |---------|---------|---------|---------| |**Channels** | Standard, Private, Shared | New and existing | Must be created or already in migration mode | |**Chats** | Group, 1:1 | New and existing | Meeting chats not supported; external members supported | -## Create or select an existing channel or chat +## Step 1: Create or select an existing channel or chat You can create a new channel or chat in a Team, or use an existing one, to migrate users' message history from an external application to Teams. -## Use startMigration API to import messages +## Step 2: Use startMigration API to import messages * Use `startMigration` API, to enable migration mode on Teams channels or chats, and allow import of historical messages. Previously, import operations were restricted to newly created standard channels and chats in an empty state. -* Define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel or chat’s current `createdDateTime` and replaces it during migration. +* Define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel or chat’s current `creationDateTime` and replaces it during migration. ### [Channel migration](#tab/channelmigration) -All the Shared, Private, and Public channels are supported. You can optionally provide a request body to specify the minimum timestamp for the messages to be migrated. +You can provide a request body to specify the minimum timestamp for the messages to be migrated, optionally. #### Channel request @@ -74,30 +74,33 @@ All the Shared, Private, and Public channels are supported. You can optionally p POST /teams/{team-id}/channels/{channel-id}/startMigration { -"conversationCreationDateTime": "2024-01-01T00:00:00Z" +"conversationcreationDateTime": "2024-01-01T00:00:00Z" } ``` #### Channel response -If the request is successful, the method returns a '204 No Content' status code. The response body is empty. +If the request is successful, the method returns the following status: -Example of a channel request: +```http +HTTP/1.1 204 No Content +``` + +The response body is empty. + +Example: ```HTTP POST https://graph.microsoft.com/beta/teams/57fb72d0-d811-46f4-8947-305e6072eaa5/channels/19:4b6bed8d24574f6a9e436813cb2617d8@thread.tacv2/startMigration { -“conversationCreationDateTime”: “2024-01-01T00:00:00Z” +“conversationcreationDateTime”: “2024-01-01T00:00:00Z” } -Response -HTTP/1.1 204 No Content - ``` ### [Chat migration](#tab/chatmigration) -* The `startMigration` API initiates the message migration process by setting the migrationMode property to 'inProgress' for a specified chat. +* `startMigration` API initiates the message migration process by setting the migrationMode property to 'inProgress' for a specified chat. #### Chat request @@ -105,66 +108,210 @@ HTTP/1.1 204 No Content POST /chats/{chat-id}/startMigration { -"conversationCreationDateTime": "2024-01-01T00:00:00Z" +"conversationcreationDateTime": "2024-01-01T00:00:00Z" } ``` #### Chat response -If the request is successful, the method returns a 204 No Content status code. The response body is empty. +If the request is successful, the method returns the following status: -Example of a chat request: +```http +HTTP/1.1 204 No Content +``` + +The response body is empty. + +Example: ```HTTP POST https://graph.microsoft.com/beta/teams/57fb72d0-d811-46f4-8947-305e6072eaa5/channels/19:4b6bed8d24574f6a9e436813cb2617d8@thread.tacv2/startMigration { -“conversationCreationDateTime”: “2024-01-01T00:00:00Z” +“conversationcreationDateTime”: “2024-01-01T00:00:00Z” } -``` -Response of the request: **HTTP/1.1 204 No Content** +``` > [!NOTE] > -> * If no request body is provided, the API uses the current date and time as the minimum timestamp. +> If no request body is provided, the API uses the current date and time as the minimum timestamp. > `conversationCreationDateTime` must be: -> * Greater than the minimum value for `DateTimeOffset`. -> * Less than the current value of the channel or chat's `CreatedDateTime`. +> +> * Greater than the minimum value for `DateTimeOffset`. +> +> * Less than the current value of the channel or chat's `creationDateTime`. -## Call GET API to check migrationMode status +## Step 3: Call GET API to check migrationMode status -After completing Step 2, call the `GET channel` or `GET chat` API to confirm that the *migrationMode* property is set to *inProgress*. For more information, see [GET Channel](/graph/api/channel-get?view=graph-rest-1.0&tabs=http) +Call `GET channel` or `GET chat` APIs to confirm that the `migrationMode` property is set to `inProgress`. For more information on the APIs, see: -```HTTP -GET /teams/{team-id}/channels/{channel-id} +* [GET channel](/graph/api/channel-get?view=graph-rest-1.0&tabs=http&preserve-view=true) +* [GET chat](/graph/api/chat-get?view=graph-rest-1.0&tabs=http&preserve-view=true) + +## Step 4: Import messages using POST API + +Use POST API to import back-in-time messages using the `createdDateTime` and `from` keys in the request body. + +> [!NOTE] +> +> * Messages imported with `createdDateTime` earlier than the message thread `createdDateTime` isn't supported. +> * `createdDateTime` must be unique across messages in the same thread. +> * `createdDateTime` supports timestamps with milliseconds precision. For example, if the incoming request message has the value of `createdDateTime` set as *2020-09-16T05:50:31.0025302Z*, then it would be converted to *2020-09-16T05:50:31.002Z* when the message is ingested. + +### Request (POST message that is text-only) + +```http +POST https://graph.microsoft.com/v1.0/teams/team-id/channels/channel-id/messages + +{ + "createdDateTime":"2019-02-04T19:58:15.511Z", + "from":{ + "user":{ + "id":"id-value", + "displayName":"Joh Doe", + "userIdentityType":"aadUser" + } + }, + "body":{ + "contentType":"html", + "content":"Hello World" + } +} +``` + +#### Response + +```http +HTTP/1.1 200 OK + +{ + "@odata.context":"https://graph.microsoft.com/v1.0/$metadata#teams('team-id')/channels('channel-id')/messages/$entity", + "id":"id-value", + "replyToId":null, + "etag":"id-value", + "messageType":"message", + "createdDateTime":"2019-02-04T19:58:15.58Z", + "lastModifiedDateTime":null, + "deleted":false, + "subject":null, + "summary":null, + "importance":"normal", + "locale":"en-us", + "policyViolation":null, + "from":{ + "application":null, + "device":null, + "conversation":null, + "user":{ + "id":"id-value", + "displayName":"Joh Doe", + "userIdentityType":"aadUser" + } + }, + "body":{ + "contentType":"html", + "content":"Hello World" + }, + "attachments":[ + ], + "mentions":[ + ], + "reactions":[ + ] +} +``` + +#### Error message + +```http +400 Bad Request +``` + +#### Request (POST a message with inline image) + +> [!NOTE] +> +> * There are no special permission scopes in this scenario since the request is part of `chatMessage`. +> * The scopes for `chatMessage` apply here. + +```http +POST https://graph.microsoft.com/v1.0/teams/team-id/channels/channel-id/messages + +{ + "body": { + "contentType": "html", + "content": "
\n
\n\n
\n\n\n
\n
" + }, + "hostedContents":[ + { + "@microsoft.graph.temporaryId": "1", + "contentBytes": "iVBORw0KGgoAAAANSUhEUgAAANcAAAExCAYAAADvFzeeAAAXjklEQVR4Ae2d/XNU1RnH+9e0FFrA0RCIyaS8hRA0HV5KbS1gHRgVpjMClY4GHJ3yYm1HCmXaWttaaZUZtIIFKYi8lFAkvOQ9u5vN225IARVBbX9/Os9NbrLZbMjmhCfJPX5+2Lmb3T25y3O+n/M599x7w9f+++UXwoMakIF7n4GvUdR7X1RqSk01A8CFuZm5GGUAuIwKi72wF3ABF+YyygBwGRUWc2Eu4AIuzGWUAeAyKizmwlzABVyYyygDwGVUWMyFuYALuDCXUQaAy6iwmAtzARdwfWXMdeuzT+TGxz3Sfb1LunrapL07IW3pePDQ5/qavqef0c+OdYAELuAac4jGGkLL9rdvfyo9N9ODQAqBGmmrwGlb/R0u3xG4gMspOC5hG882CoRaaCSA8n1ff9doIQMu4PIOrus3u+8ZVNnw6e/Od5AALuDKOyz5hmqiPnfnzi1J9bSbgRWCpvvQfY307wQu4BoxJCOFaDK8rwsQmQsUIQhWW93XSIsewAVckYdLQ24F0Ui/926AARdwRRounZ6Np7GyYdN9DzdFBC7gijRc43GMlQ1U9s/6HXJNjYELuHI<<-----Removed----->>>>", + "contentType": "image/png" + } + ] +} ``` -## Import messages using POST API +#### Response -Go to [Import third-party platform messages to Teams using Microsoft Graph](import-external-messages-to-teams.md) and use the POST API, to begin sending back-in-time messages. +```http +HTTP/1.1 200 OK -## Complete channel and chat migration +{ + "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#teams('team-id')/channels('channel-id')/messages/$entity", + "id": "id-value", + "replyToId": null, + "etag": "id-value", + "messageType": "message", + "createdDateTime": "2019-02-04T19:58:15.511Z", + "lastModifiedDateTime": null, + "deleted": false, + "subject": null, + "summary": null, + "importance": "normal", + "locale": "en-us", + "policyViolation": null, + "from": { + "application": null, + "device": null, + "conversation": null, + "user": { + "id": "id-value", + "displayName": "Joh Doe", + "userIdentityType": "aadUser" + } + }, + "body": { + "contentType": "html", + "content": "
\n
\n\n
\n\n\n
\n
" + }, + "attachments": [], + "mentions": [], + "reactions": [] +} +``` -Namespace: microsoft.graph +## Step 5: Complete channel and chat migration -Use the `completeMigration` API to finish the migration process for both new and existing channels and chats. Previously, this operation was limited to newly created Standard channels and chats initiated for the initial migration flow. +Use `completeMigration` API to finish the migration process for both new and existing channels and chats: +Previously, this operation was limited to newly created standard channels and chats, initiated for the initial migration flow. -### Complete Channel Migration +### [Complete channel migration](#tab/completechannelmigration) -* When a channel is created in migration mode for the initial import flow, calling the **completeMigration** API updates the migrationMode property to completed. **This change is permanent and marks the channel as fully migrated.** -* After calling completeMigration, you can still import extra messages by using the startMigration API. +* When a channel is created in migration mode for the initial import flow, calling the `completeMigration` API updates the `migrationMode` property to completed. This change is permanent and marks the channel as fully migrated. +* After calling `completeMigration`, you can still import extra messages by using the `startMigration` API. -#### Request for Completing Channel Migration +#### Request for completing channel migration ```HTTP POST /teams/{team-id}/channels/{channel-id}/completeMigration ``` -### Complete Chat Migration +### [Complete chat migration](#tab/completechatmigration) -* For existing chats already in migration mode, call the **completeMigration** API to update the migrationMode property to completed. **This marks the chat as fully migrated.** -* After calling completeMigration on a new or existing chat, you can continue importing messages by using the startMigration API. +* For existing chats, which are already in migration mode, call `completeMigration` API to update the `migrationMode` property to completed. This process marks the chat as fully migrated. +* After calling `completeMigration` on a new or existing chat, you can continue importing messages by using `startMigration` API. #### Request for Completing Chat Migration @@ -172,19 +319,28 @@ POST /teams/{team-id}/channels/{channel-id}/completeMigration POST /chats/{chat-id}/completeMigration ``` -> [!IMPORTANT] -> Don't include a request body when calling this method for channels or chats. If the request is successful, the method returns a 204 No Content status code. The response body is empty. -> -> [!NOTE] -> -> In Migration Mode: -> -> * Certain operations such as sending messages and adding members are restricted. -> * Calling the completeMigration API means that channel or chat migration is complete and normal operations can resume. +## Step 6: Call GET API to verify migrationMode + +Call `GET channel` or `GET chat` API, to verify that the migrationMode property is marked as completed. + +### Import content scope -## Call GET API to verify migrationMode +The following table provides the content scope: -To verify that the migrationMode property is marked as **completed** +|In-scope | Out-of-scope| +|----------|--------------------------| +|Team and channel messages|1:1 and group chat messages| +|Created time of the original message|Private channels| +|Inline images as part of the message|At mentions| +|Links to existing files in SPO or OneDrive|Reactions| +|Messages with rich text|Videos| +|Message reply chain|Announcements| +|High throughput processing|Code snippets| +||Stickers| +||Emojis| +||Quotes| +||Cross posts between channels| +||Shared channels| ## See also From 1af3bba20e561d676e65051fd69569f44fbe5aef Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Mon, 29 Sep 2025 16:41:55 +0530 Subject: [PATCH 24/30] removed tunnel --- .../import-external-platform-messages-to-teams.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md index e784df914ce..71c09c0eaa2 100644 --- a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md @@ -297,7 +297,7 @@ HTTP/1.1 200 OK Use `completeMigration` API to finish the migration process for both new and existing channels and chats: Previously, this operation was limited to newly created standard channels and chats, initiated for the initial migration flow. -### [Complete channel migration](#tab/completechannelmigration) +### Complete channel migration * When a channel is created in migration mode for the initial import flow, calling the `completeMigration` API updates the `migrationMode` property to completed. This change is permanent and marks the channel as fully migrated. * After calling `completeMigration`, you can still import extra messages by using the `startMigration` API. @@ -308,12 +308,12 @@ Previously, this operation was limited to newly created standard channels and ch POST /teams/{team-id}/channels/{channel-id}/completeMigration ``` -### [Complete chat migration](#tab/completechatmigration) +### Complete chat migration * For existing chats, which are already in migration mode, call `completeMigration` API to update the `migrationMode` property to completed. This process marks the chat as fully migrated. * After calling `completeMigration` on a new or existing chat, you can continue importing messages by using `startMigration` API. -#### Request for Completing Chat Migration +#### Request for completing chat migration ```HTTP POST /chats/{chat-id}/completeMigration @@ -321,7 +321,7 @@ POST /chats/{chat-id}/completeMigration ## Step 6: Call GET API to verify migrationMode -Call `GET channel` or `GET chat` API, to verify that the migrationMode property is marked as completed. +Call `GET channel` or `GET chat` API, to verify that the `migrationMode` property is marked as completed. ### Import content scope From 3daa96f6fd8cd02d0701b49786a3623793d0fec1 Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Mon, 29 Sep 2025 16:56:16 +0530 Subject: [PATCH 25/30] Update import-external-platform-messages-to-teams.md --- .../import-external-platform-messages-to-teams.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md index 71c09c0eaa2..fb52fd753ce 100644 --- a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md @@ -50,7 +50,7 @@ Delegated authentication isn't supported. ### Supported channel and chat types -|Entities |Sub type |Migration mode Support |Notes| +|Entities |Sub type |Migration mode support |Notes| |---------|---------|---------|---------| |**Channels** | Standard, Private, Shared | New and existing | Must be created or already in migration mode | |**Chats** | Group, 1:1 | New and existing | Meeting chats not supported; external members supported | @@ -133,15 +133,6 @@ POST https://graph.microsoft.com/beta/teams/57fb72d0-d811-46f4-8947-305e6072eaa5 ``` -> [!NOTE] -> -> If no request body is provided, the API uses the current date and time as the minimum timestamp. -> `conversationCreationDateTime` must be: -> -> * Greater than the minimum value for `DateTimeOffset`. -> -> * Less than the current value of the channel or chat's `creationDateTime`. - ## Step 3: Call GET API to check migrationMode status Call `GET channel` or `GET chat` APIs to confirm that the `migrationMode` property is set to `inProgress`. For more information on the APIs, see: From e0559735f4296fe71d97de0c6192feb787f3d1db Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Mon, 29 Sep 2025 17:05:11 +0530 Subject: [PATCH 26/30] end tabset added --- .../import-external-platform-messages-to-teams.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md index fb52fd753ce..4b8c6b03ccb 100644 --- a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md @@ -133,6 +133,8 @@ POST https://graph.microsoft.com/beta/teams/57fb72d0-d811-46f4-8947-305e6072eaa5 ``` +### End Tabset {.tabset} + ## Step 3: Call GET API to check migrationMode status Call `GET channel` or `GET chat` APIs to confirm that the `migrationMode` property is set to `inProgress`. For more information on the APIs, see: From b5888491b5df3e4b63ae45b3904cbf51e63f28a2 Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Mon, 29 Sep 2025 17:13:15 +0530 Subject: [PATCH 27/30] ending loop component --- .../import-external-platform-messages-to-teams.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md index 4b8c6b03ccb..6f99b5e4390 100644 --- a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md @@ -133,7 +133,7 @@ POST https://graph.microsoft.com/beta/teams/57fb72d0-d811-46f4-8947-305e6072eaa5 ``` -### End Tabset {.tabset} +--- ## Step 3: Call GET API to check migrationMode status From debfdbde5171d1f5e2a8afd396844deee8b5d43b Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Tue, 30 Sep 2025 20:45:26 +0530 Subject: [PATCH 28/30] incorporated review changes --- ...ort-external-platform-messages-to-teams.md | 57 +++++++------------ 1 file changed, 22 insertions(+), 35 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md index 6f99b5e4390..a138d7c904e 100644 --- a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md @@ -10,37 +10,12 @@ ms.date: 09/26/2025 # Import external platform messages to Teams via Microsoft Graph -Use Microsoft Graph to migrate users' existing message history and data from an external system into Teams. Users can continue their conversations seamlessly without interruption, by recreating the messaging hierarchy from a third-party platform directly within Teams. +Use Microsoft Graph to import users' existing message history and data from an external system into Teams. Users can continue their conversations seamlessly without interruption, by recreating the messaging hierarchy from a third-party platform directly within Teams. > [!NOTE] > In the future, Microsoft might require you or your customers to pay extra fees based on the amount of data imported. -## Prerequisites - -### Analyze and prepare message data - -* Review the third-party messages to decide what is migrated. -* Extract the selected data from the third-party channel or chat. -* Map the third-party channel or chat structure to the Teams structure. -* Convert imported data into a format that's suitable for migration. - -### Set up your Microsoft 365 tenant - -* Ensure that a Microsoft 365 tenant exists for the import data. For more information on setting up a Microsoft 365 tenancy for Teams, see [prepare your Microsoft 365 tenant](../../concepts/build-and-test/prepare-your-o365-tenant.md). -* Make sure that team members are in Microsoft Entra ID. For more information, see [add a new user](/azure/active-directory/fundamentals/add-users-azure-active-directory) to Microsoft Entra ID. - -## Understand the migration workflow - -You can ensure a seamless transition of historical messages, in both existing and newly created channels or chats by performing the following steps: - -* [Step 1: Create or select an existing channel or chat](#step-1-create-or-select-an-existing-channel-or-chat) -* [Step 2: Use startMigration API to import messages](#step-2-use-startmigration-api-to-import-messages) -* [Step 3: Call GET API to check migrationMode status](#step-3-call-get-api-to-check-migrationmode-status) -* [Step 4: Import messages using POST API](#step-4-import-messages-using-post-api) -* [Step 5: Complete channel and chat migration](#step-5-complete-channel-and-chat-migration) -* [Step 6: Call GET API to verify migrationMode](#step-6-call-get-api-to-verify-migrationmode) - -### Permissions +## Permissions Delegated authentication isn't supported. @@ -55,18 +30,28 @@ Delegated authentication isn't supported. |**Channels** | Standard, Private, Shared | New and existing | Must be created or already in migration mode | |**Chats** | Group, 1:1 | New and existing | Meeting chats not supported; external members supported | -## Step 1: Create or select an existing channel or chat +## Understand the import process -You can create a new channel or chat in a Team, or use an existing one, to migrate users' message history from an external application to Teams. +You can import historical messages seamlessly, in both; existing and newly created channels or chats by performing the following migration steps: -## Step 2: Use startMigration API to import messages +1. [Create or use an existing channel or chat](#step-1-create-or-use-an-existing-channel-or-chat) +1. [Step 2: Enable migration mode to import messages](#step-2-enable-migration-mode-to-import-messages) +1. [Step 3: Call GET API to check migrationMode status](#step-3-call-get-api-to-check-migrationmode-status) +1. [Step 4: Import messages using POST API](#step-4-import-messages-using-post-api) +1. [Step 5: Complete channel and chat migration](#step-5-complete-channel-and-chat-migration) +1. [Step 6: Call GET API to verify migrationMode](#step-6-call-get-api-to-verify-migrationmode) -* Use `startMigration` API, to enable migration mode on Teams channels or chats, and allow import of historical messages. Previously, import operations were restricted to newly created standard channels and chats in an empty state. -* Define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel or chat’s current `creationDateTime` and replaces it during migration. +## Step 1: Create or use an existing channel or chat -### [Channel migration](#tab/channelmigration) +You can create a new channel or chat in a team, or use existing ones, to migrate users' message history from an external application to Teams. + +## Step 2: Enable migration mode to import messages -You can provide a request body to specify the minimum timestamp for the messages to be migrated, optionally. +* Use the `startMigration` API, to enable migration mode on Teams channels or chats, and allow import of historical messages. +* Define a minimum timestamp for messages to be migrated. The provided timestamp must be older than the channel or chat’s current `createdDateTime`. The provided timestamp replaces the existing `createdDateTime` of the channel. +* The`creationDateTime`property is optional in a request body. If omitted, the `startMigration` API uses the current date and time as a minimum timestamp. + +### [Channel migration](#tab/channelmigration) #### Channel request @@ -78,6 +63,8 @@ POST /teams/{team-id}/channels/{channel-id}/startMigration } ``` +`conversationCreationDateTime` must be greater than the minimum value for`DateTimeOffset` and less than the current value of the channel's `createdDateTime`. + #### Channel response If the request is successful, the method returns the following status: @@ -100,7 +87,7 @@ POST https://graph.microsoft.com/beta/teams/57fb72d0-d811-46f4-8947-305e6072eaa5 ### [Chat migration](#tab/chatmigration) -* `startMigration` API initiates the message migration process by setting the migrationMode property to 'inProgress' for a specified chat. +The `startMigration` API initiates the message migration process by setting the `migrationMode` property to `inProgress` for a specified chat. #### Chat request From a2436ac7db67a76348c7db91bf8e70512313ca1a Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Tue, 30 Sep 2025 21:54:36 +0530 Subject: [PATCH 29/30] Update import-external-platform-messages-to-teams.md --- ...ort-external-platform-messages-to-teams.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md index a138d7c904e..3ac4b8a424d 100644 --- a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md @@ -5,7 +5,7 @@ ms.localizationpriority: high author: "surbhigupta" ms.topic: overview ms.owner: mehakagarwal -ms.date: 09/26/2025 +ms.date: 09/30/2025 --- # Import external platform messages to Teams via Microsoft Graph @@ -35,11 +35,11 @@ Delegated authentication isn't supported. You can import historical messages seamlessly, in both; existing and newly created channels or chats by performing the following migration steps: 1. [Create or use an existing channel or chat](#step-1-create-or-use-an-existing-channel-or-chat) -1. [Step 2: Enable migration mode to import messages](#step-2-enable-migration-mode-to-import-messages) -1. [Step 3: Call GET API to check migrationMode status](#step-3-call-get-api-to-check-migrationmode-status) -1. [Step 4: Import messages using POST API](#step-4-import-messages-using-post-api) -1. [Step 5: Complete channel and chat migration](#step-5-complete-channel-and-chat-migration) -1. [Step 6: Call GET API to verify migrationMode](#step-6-call-get-api-to-verify-migrationmode) +1. [Enable migration mode to import messages](#step-2-enable-migration-mode-to-import-messages) +1. [Call GET API to check the migration status](#step-3-call-get-api-to-check-the-migration-status) +1. +1. [Complete channel and chat migration](#step-5-complete-channel-and-chat-migration) +1. [Call GET API to verify migrationMode](#step-6-call-get-api-to-verify-migrationmode) ## Step 1: Create or use an existing channel or chat @@ -122,16 +122,16 @@ POST https://graph.microsoft.com/beta/teams/57fb72d0-d811-46f4-8947-305e6072eaa5 --- -## Step 3: Call GET API to check migrationMode status +## Step 3: check the migration status -Call `GET channel` or `GET chat` APIs to confirm that the `migrationMode` property is set to `inProgress`. For more information on the APIs, see: +Call `GET channel` or `GET chat` APIs to confirm that the `migrationMode` property is set to `inProgress`. For more information see: * [GET channel](/graph/api/channel-get?view=graph-rest-1.0&tabs=http&preserve-view=true) * [GET chat](/graph/api/chat-get?view=graph-rest-1.0&tabs=http&preserve-view=true) -## Step 4: Import messages using POST API +## Step 4: Import messages -Use POST API to import back-in-time messages using the `createdDateTime` and `from` keys in the request body. +Use the `POST` API to import back-in-time messages using the `createdDateTime` and `from` keys in the request body. > [!NOTE] > From 957b062c5a9e25dc29c6ee5ac963f24e47af8a3a Mon Sep 17 00:00:00 2001 From: NehaHEDAU-MSFT Date: Tue, 30 Sep 2025 22:11:39 +0530 Subject: [PATCH 30/30] Self review --- ...ort-external-platform-messages-to-teams.md | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md index 3ac4b8a424d..25f00181cb1 100644 --- a/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md +++ b/msteams-platform/graph-api/import-messages/import-external-platform-messages-to-teams.md @@ -27,17 +27,17 @@ Delegated authentication isn't supported. |Entities |Sub type |Migration mode support |Notes| |---------|---------|---------|---------| -|**Channels** | Standard, Private, Shared | New and existing | Must be created or already in migration mode | +|**Channels** | Standard, Private, Shared | New and existing | Channels must be created or already in migration mode | |**Chats** | Group, 1:1 | New and existing | Meeting chats not supported; external members supported | ## Understand the import process -You can import historical messages seamlessly, in both; existing and newly created channels or chats by performing the following migration steps: +You can import historical messages seamlessly, in both; existing and newly created channels or chats by performing the following steps: 1. [Create or use an existing channel or chat](#step-1-create-or-use-an-existing-channel-or-chat) 1. [Enable migration mode to import messages](#step-2-enable-migration-mode-to-import-messages) -1. [Call GET API to check the migration status](#step-3-call-get-api-to-check-the-migration-status) -1. +1. [Check the migration status](#step-3-check-the-migration-status) +1. [Import messages](#step-4-import-messages) 1. [Complete channel and chat migration](#step-5-complete-channel-and-chat-migration) 1. [Call GET API to verify migrationMode](#step-6-call-get-api-to-verify-migrationmode) @@ -122,14 +122,14 @@ POST https://graph.microsoft.com/beta/teams/57fb72d0-d811-46f4-8947-305e6072eaa5 --- -## Step 3: check the migration status +## Step 3: Check the migration status -Call `GET channel` or `GET chat` APIs to confirm that the `migrationMode` property is set to `inProgress`. For more information see: +Call `GET channel` or `GET chat` APIs to confirm that the `migrationMode` property is set to `inProgress`. For more information, see: * [GET channel](/graph/api/channel-get?view=graph-rest-1.0&tabs=http&preserve-view=true) * [GET chat](/graph/api/chat-get?view=graph-rest-1.0&tabs=http&preserve-view=true) -## Step 4: Import messages +## Step 4: Import messages Use the `POST` API to import back-in-time messages using the `createdDateTime` and `from` keys in the request body. @@ -274,8 +274,7 @@ HTTP/1.1 200 OK ## Step 5: Complete channel and chat migration -Use `completeMigration` API to finish the migration process for both new and existing channels and chats: -Previously, this operation was limited to newly created standard channels and chats, initiated for the initial migration flow. +Use the `completeMigration` API to finish the migration process for both new and existing channels and chats, as follows: ### Complete channel migration @@ -290,8 +289,8 @@ POST /teams/{team-id}/channels/{channel-id}/completeMigration ### Complete chat migration -* For existing chats, which are already in migration mode, call `completeMigration` API to update the `migrationMode` property to completed. This process marks the chat as fully migrated. -* After calling `completeMigration` on a new or existing chat, you can continue importing messages by using `startMigration` API. +* For existing chats, which are already in migration mode, call the `completeMigration` API to update the `migrationMode` property to completed. This process marks the chat as fully migrated. +* After calling `completeMigration` on a new or existing chat, you can continue importing messages by using the `startMigration` API. #### Request for completing chat migration @@ -301,7 +300,7 @@ POST /chats/{chat-id}/completeMigration ## Step 6: Call GET API to verify migrationMode -Call `GET channel` or `GET chat` API, to verify that the `migrationMode` property is marked as completed. +Call `GET channel` or `GET chat` APIs, to verify that the `migrationMode` property is marked as completed. ### Import content scope