Updates from: 03/30/2021 03:12:22
Service Microsoft Docs article Related commit history on GitHub Change details
platform Import External Messages To Teams https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/graph-api/import-messages/import-external-messages-to-teams.md
keywords: teams import messages api graph microsoft migrate migration post
# Import third-party platform messages to Teams using Microsoft Graph
->[!IMPORTANT]
-> Microsoft Graph and Microsoft Teams public previews are available for early-access and feedback. Although this release has undergone extensive testing, it is not intended for use in production.
- 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]
Since existing data is being migrated, maintaining the original message timestam
#### Request (create a team in migration state) ```http
-POST https://graph.microsoft.com/beta/teams
+POST https://graph.microsoft.com/v1.0/teams
Content-Type: application/json { "@microsoft.graph.teamCreationMode": "migration",
- "template@odata.bind": "https://graph.microsoft.com/beta/teamsTemplates('standard')",
+ "template@odata.bind": "https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
"displayName": "My Sample Team", "description": "My Sample TeamΓÇÖs Description", "createdDateTime": "2020-03-14T11:22:17.043Z"
Content-Type: application/json
```http HTTP/1.1 202 Accepted
-Location: /teams/{teamId}/operations/{operationId}
-Content-Location: /teams/{teamId}
+Location: /teams/{team-id}/operations/{operation-id}
+Content-Location: /teams/{team-id}
``` #### Error messages
Content-Location: /teams/{teamId}
Creating a channel for the imported messages is similar to the create team scenario:
-> [Create a new channel](/graph/api/channel-post?view=graph-rest-beta&tabs=http&preserve-view=true) with a back-in-time timestamp using the channel resource `createdDateTime` property. Place the new channel in `migration mode`, a special state that bars users from most chat activities within the channel until the migration process is complete. Include the `channelCreationMode` instance attribute with the `migration` value in the POST request to explicitly identify the new team as being created for migration.
+> [Create a new channel](/graph/api/channel-post?view=graph-rest-v1.0&tabs=http&preserve-view=true) with a back-in-time timestamp using the channel resource `createdDateTime` property. Place the new channel in `migration mode`, a special state that bars users from most chat activities within the channel until the migration process is complete. Include the `channelCreationMode` instance attribute with the `migration` value in the POST request to explicitly identify the new team as being created for migration.
<!-- markdownlint-disable MD024 --> #### Permissions
Creating a channel for the imported messages is similar to the create team scena
#### Request (create a channel in migration state) ```http
-POST https://graph.microsoft.com/beta/teams/{id}/channels
+POST https://graph.microsoft.com/v1.0/teams/{team-id}/channels
Content-Type: application/json {
Content-Type: application/json
HTTP/1.1 202 Accepted {
- "@odata.context":"https://canary.graph.microsoft.com/testprodbetateamsgraphsvcncus/$metadata#teams('9cc6d6ab-07d8-4d14-bc2b-7db8995d6d23')/channels/$entity",
- "id":"19:e90f6814ce674072a4126206e7de485e@thread.tacv2",
+ "@odata.context":"https://graph.microsoft.com/v1.0/$metadata#teams('team-id')/channels/$entity",
+ "id":"id-value",
"createdDateTime":null, "displayName":"Architecture Discussion", "description":"This channel is where we debate all future architecture plans",
After the team and channel have been created, you can begin sending back-in-time
#### Request (POST message that is text-only) ```http
-POST https://graph.microsoft.com/beta/teams/teamId/channels/channelId/messages
+POST https://graph.microsoft.com/v1.0/teams/team-id/channels/channel-id/messages
{ "createdDateTime":"2019-02-04T19:58:15.511Z",
POST https://graph.microsoft.com/beta/teams/teamId/channels/channelId/messages
HTTP/1.1 200 OK {
- "@odata.context":"https://graph.microsoft.com/beta/$metadata#teams('teamId')/channels('channelId')/messages/$entity",
+ "@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",
HTTP/1.1 200 OK
> **Note**: There are no special permission scopes in this scenario since the request is part of chatMessage; scopes for chatMessage apply here as well. ```http
-POST https://graph.microsoft.com/beta/teams/teamId/channels/channelId/messages
+POST https://graph.microsoft.com/v1.0/teams/team-id/channels/channel-id/messages
{ "body": {
POST https://graph.microsoft.com/beta/teams/teamId/channels/channelId/messages
HTTP/1.1 200 OK {
- "@odata.context": "https://graph.microsoft.com/beta/$metadata#teams('teamId')/channels('channelId')/messages/$entity",
+ "@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",
HTTP/1.1 200 OK
## Step Four: Complete migration mode
-Once the message migration process has completed, both the team and channel are taken out of migration mode using the `completeMigration` method. This step opens the team and channel resources for general use by team members. The action is bound to the `team` instance.
+Once the message migration process has completed, both the team and channel are taken out of migration mode using the `completeMigration` method. This step opens the team and channel resources for general use by team members. The action is bound to the `team` instance. All channels must be completed out of migration mode before the team can be completed.
-#### Request (end team migration mode)
+#### Request (end channel migration mode)
```http
-POST https://graph.microsoft.com/beta/teams/teamId/completeMigration
+POST https://graph.microsoft.com/v1.0/teams/team-id/channels/channel-id/completeMigration
```
POST https://graph.microsoft.com/beta/teams/teamId/completeMigration
HTTP/1.1 204 NoContent ```
-#### Request (end channel migration mode)
+#### Request (end team migration mode)
```http
-POST https://graph.microsoft.com/beta/teams/teamId/channels/channelId/completeMigration
-
+POST https://graph.microsoft.com/v1.0/teams/team-id/completeMigration
``` #### Response
POST https://graph.microsoft.com/beta/teams/teamId/channels/channelId/completeMi
HTTP/1.1 204 NoContent ```
-#### Error response
-
-```http
-400 Bad Request
-```
- * Action called on a `team` or `channel` that is not in `migrationMode`. ## Step Five: Add team members
You can add a member to a team [using the Teams UI](https://support.microsoft.co
#### Request (add member) ```http
-POST https://graph.microsoft.com/beta/teams/{id}/members
+POST https://graph.microsoft.com/beta/teams/{team-id}/members
Content-type: application/json Content-length: 30 {
HTTP/1.1 204 No Content
<!-- markdownlint-disable MD001 --> <!-- markdownlint-disable MD026 -->
-* You can import messages from users who are not in Teams. **NOTE**: Messages imported for users not present in the tenant will not be searchable in the Teams client or compliance portals during Public Preview.
- * Once the `completeMigration` request is made, you cannot import further messages into the team. * Team members can only be added to the new team after the `completeMigration` request has returned a successful response.
HTTP/1.1 204 No Content
|Messages with rich text|Videos| |Message reply chain|Announcements| |High throughput processing|Code snippets|
-||Adaptive cards|
||Stickers| ||Emojis| ||Quotes|
HTTP/1.1 204 No Content
## See also > [!div class="nextstepaction"]
->[Learn more about Microsoft Graph and Teams integration](/graph/teams-concept-overview)
+> [Learn more about Microsoft Graph and Teams integration](/graph/teams-concept-overview)
platform Get Started Dotnet App Studio https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/tutorials/get-started-dotnet-app-studio.md
When the app starts, a browser window opens with the root of the app launched. Y
- [https://localhost:44327/](https://localhost:44327/) - [https://localhost:44327/hello](https://localhost:44327/hello) - [https://localhost:44327/first](https://localhost:44327/first)-- [https://localhost:44327/second]https://localhost:44327/second)
+- [https://localhost:44327/second](https://localhost:44327/second)
<a name="HostSample"></a>