Skip to main content

Copy private chats - Best practices

Recommendations for getting the most complete result when you copy Microsoft Teams private chats with PowerShell.

Note: PowerShell integration requires a ShareGate Migrate Pro or Enterprise subscription. It is not available on the Essentials plan.

A few choices you make before and during a Microsoft Teams private chat copy affect which chats arrive and who can see them. These recommendations help you get the most complete result with Copy-Chat.

In this article, selected users are the users whose chats you copy with the -Users parameter. Mapped users are the source and destination pairs in your user mappings.

Map everyone, not just the users you select

It's best to map every source user to their destination account, including deactivated users.

ShareGate Migrate only copies a chat when it can match every participant to a destination user. If one participant isn't mapped, that chat is skipped.

Deleted accounts, external users, and guests can't be mapped. Their messages still copy and show as Unknown user, with their original name kept.

Select everyone who needs access to a chat in the same run

At the destination, only selected users become members of a copied chat. Messages from mapped users who weren't selected still show under their real name, but those users can't see the chat.

We recommend selecting everyone who should have access to a chat in the same run, for example a whole department at once.

Limit how much history to copy

By default, ShareGate Migrate copies all chat history, and more history means a longer copy. To copy only recent messages, set a start date with New-ChatCopyOptions. For example, to copy the last 30 days:

$options = New-ChatCopyOptions -ChatStartDate (Get-Date).AddDays(-30)

Ask users to sign out and back in

Copied chats sometimes don't appear in Microsoft Teams right away. This is a display delay in Microsoft Teams, and no data is missing.

We recommend telling users to sign out of Microsoft Teams and sign back in if they don't see their chats.

Did this answer your question?