Teams Cross Tenant Migration for Personal Chat

 

Teams Personal Chat Migration

 

The largest challenge I have been facing is migrating 1:1 chats from one Teams tenant to another.

1:1 Chat Migration is extremely slow. Guess you have experienced this while using Teams App. If you scroll within a chat and reached the non-cached messages, they are pulling very slow. This is what you will experience upon execution of Chat messages.

Additionally complex is the availability of shared files. If OneDrive isn’t fully sync’ed, placing the sharing information is impossible. This indicates the sequence for user service migration.

Let’s list the three major challenges in personal chat migrations:

 

1.     Counting the Private Messages
Teams has no out-of-the-box possibility counting the personal/ group chat messages. You could write a script using the GraphAPI:  getTeamsUserActivityCounts method
A limitation exists here, it can only return the number of messages in a specified period (D7, D30, D90, and D180). It does not return the total number of private chats or messages, you will have to extrapolate the message count for the entire exitance of the users Teams usage.
However, more accurate is
getAllMessages method in the Graph API, but this call is very slow and runs therefore for ages. Furthermore, it will run in loops and counts message multiple times, simply said, for each user involved in a chat it counts 1 for each in a run.

Alternatively using Get-ExoMailboxFolderStatistics to view the Chat messages in a Mailbox is possible too. It isn’t as precise because there is no way to identify and remove duplicate messages. The count of messages may be higher than the number of messages that will be migrated. 

 

2.     Best sequence to migrate the private chat messages
The common wish is, that during a T2T migration chat messages should be present at user cut-over day. This is nearly impossible to schedule. It is slow, Notifications might occur during adding (migrating) a chat message. Migrated chat message might also look different, as they are posted on-behalf of a service account

Migration options and solutions I provide later in this blog text.

 

NOTE:
Another topic to be considered is, do not migrated chat messages before the user starts using the target Teams. This is because there is no DELTA migration option.
If you would provision (pre-load) Teams personal Chat before you migrated the users Teams service, all messages from the point of pre-load until cut-over are left behind !

3.     GraphAPI and Tenant Throttling
Throttling is a pain in the “behind” and you ALLWAYS will hit the tenant limitations.
There is NO way avoiding throttling.
At the end of this blog, you will find the link to Microsoft Doc’s with the performance limitation implemented into MSGraph applying to both the READ and WRITE API. All you scripts and all vendors on the market are relying on the those limitations, regardless what they promise.

 

APIs used for chat migration

There are two APIs, one from SharePoint and the other Team Graph API, whereby only the Export API can be used to find the private chats and read the messages. The  Microsoft Graph API can write private chat message content to the target tenant

The SharePoint Migration Export (Asynchronous Metadata Read) API 

https://docs.microsoft.com/en-us/sharepoint/dev/apis/export-amr-api.

 

  • Can force multiple reads of messages depending on how many chat participants are involved (Group Chat)
  • Allows for incremental migration
  • Does not support batch processing
  • About the same fidelity of content as the Microsoft Graph API
  • Provides faster for reading. See Microsoft Teams service limits using Teams Export API.

 

Teams request type

Limit per app per tenant

Limit per app across all tenants

GET 1:1/group chat message

200 requests per second (RPS)

600 RPS

  • Can find the private chats (and the chat ID) and read the chat messages.

 

 

The Microsoft Graph API 

https://docs.microsoft.com/en-us/graph/use-the-api

  • Allows for incremental migration
  • Does not support batch processing
  • Slower for reading. See Microsoft Teams service limits using Graph API

 

Teams request type

Limit per app per tenant

Limit per app across all tenants

GET 1:1/group chat message

20 RPS

200 RPS


  • Cannot find the private chats (or the chat ID); nor find the messages in the private chats. Information about private chats is not available.

Writing with the Microsoft Graph API private chat message content to the target tenant limitations and speed:

  • Impersonate the original owner of the chat message when writing the messages is not possible. As the message owner cannot be written, the MIGRATION ACCOUNT is use instead as owner. Most tools will do so and using the “owns name” as message information.
  • Microsoft Graph API’s read and write speed is identical (which cannot be used for chats and chat messages); but it is much slower than Export API’s read speed (which is used for chats and chat messages). See Microsoft Teams service limits using Graph API

 

Teams request type

Limit per app per tenant

Limit per app across all tenants

POST 1:1/group chat message

20 RPS

200 RPS

Another implication for users to be migrated exist and impacts the user experiences massively:

  • Message notifications. 
    for each message created, which the write process is doing also, the Teams client notifications sent to users cannot be suppressed via an API method when writing private chat messages to the target tenant. This includes @mentions of users within the private chat messages. It is a disturbing behaviour where users will receive a huge number of notifications in Teams if he is working actively in the target environment. The receipt of these notifications is a common complaint of users during the private chat message migration.
    The only solution so far is: asking users to disable notifications in the settings of the Teams client in their target tenant (Figure 1).

NOTE:
Even if you decide migrating only several days/weeks/month of private chat messages, indexing/ counting ALL messages is require and slow down your migration.

Comments

Popular posts from this blog

How to hide users from GAL if they are AD Connect synchronized

Cannot join external Lync Meeting: Lync Edge Server Single IP Address (Lync Edge Server Single IP Web Conferenceing Problem)

MFA with Guest Access and different tenants settings