你(Did)知道所有Teams聊天记录都会被记录吗?不仅在工作场所,在个人版本中也是如此。但是您可以关闭或禁用Microsoft Teams中的聊天记录吗?如果是这样,您如何关闭或再次打开 Teams 聊天记录?
简短的回答是,也许您可以通过解决方法禁用Microsoft Teams聊天记录,也许您也可以删除您的聊天记录。
在 Teams for Business 中禁用聊天记录(Disable Chat History in Teams for Business)
Microsoft 365商业版中的所有一对一聊天都保留在Outlook邮箱的隐藏文件夹中,用于电子数据展示、法规遵从性或培训目的。Teams聊天对话的默认保留策略是永远。但是,您可以通过创建新的保留策略来更改它。要配置保留策略,您需要成为组织的全局管理员或具有全局管理员分配给您的权限。
使用 GUI 在 Teams for Business 中禁用 Teams 聊天历史记录(Disable Teams Chat History in Teams for Business with GUI)
- 登录到Microsoft 365 合规中心(Microsoft 365 Compliance Center)。导航到策略(Policies )>保留(Retention)。选择新的保留策略(New retention policy)。
- 将策略命名为Teams Chat – No Retention之类的名称,然后选择Next。
- 保留策略的类型将默认为Static。保持不变并选择Next。
- 将所有位置的(Locations )状态(Status )切换为关闭,(Off)团队聊天(Teams chats)除外。确保已打开(On)。您还可以在此处设置政策中包含(Included )或排除(Excluded )的人员。默认值为 Included: All users(Included: All users )和Excluded: None。选择下一步(Next)。如果您还想停止保留Teams频道消息或Teams私人频道消息,请也将其打开。
- 要将保留设置为零,请选择仅在项目达到特定期限时删除它们(Only delete items when they reach a certain age)。请注意,它说,“项目(Items)不会被保留……”。这就是您想要的,它会立即删除聊天消息。在删除早于的项目(Delete items older than)下,选择自定义(Custom)。
在删除早于的项目(delete items older than)中,将年(years)、月(months)和日(days )设置为0,然后选择下一步(Next)。
- Microsoft 365让你有机会查看保留策略设置。如果您满意,请选择提交(Submit)。请注意,政策可能需要一天的时间才能生效。删除是永久性的。
一旦显示您的策略已创建,(Your policy was created)请选择完成(Done)。
使用 PowerShell 在 Teams for Business 中禁用聊天历史记录(Disable Chat History in Teams for Business with PowerShell)
PowerShell是一种适用于(PowerShell)Windows和Microsoft 365的脚本语言。要使用此脚本,您必须是组织的全局管理员或具有全局管理员分配给您的权限。
由于Microsoft Teams聊天保留策略由 Exchange Online 管理(managed by Exchange Online),因此您必须安装ExchangePowershellModule才能使用这些 cmdlet。
- 创建保留策略:
New-RetentionCompliancePolicy -Name “Teams Chat – No Retention” -TeamsChatLocation All -TeamsChatLocationException None -Enabled $true
- 在策略中设置(Set)规则以删除Teams对话。由于保留期限设置为 0 天,因此聊天记录最多可能存在 24 小时:
New-RetentionComplianceRule -Name “Chat Delete Rule” -Policy “Teams Chat – No Retention” -RetentionComplianceAction Delete -RetentionDuration 0
在 Teams for Business 中启用聊天历史记录(Enable Chat History in Teams for Business)
在Teams for Business中,除非您更改保留策略,否则聊天历史记录已启用,并且聊天消息将无限期保存。
使用 GUI 在 Teams for Business 中启用聊天历史记录(Enable Chat History in Teams for Business with GUI)
如果您在上面创建了零保留策略,但想要打开保留并因此打开聊天记录,您可以编辑或删除该策略。在本例中,我们将只删除它。
- 登录到Microsoft 365 合规中心(Microsoft 365 Compliance Center)。导航到策略(Policies )>保留(Retention)。选择团队聊天 - 无保留(Teams Chat – No Retention)。然后您可以选择编辑(Edit)、删除(Delete)或禁用策略(Disable policy)。删除或禁用该策略会将保留设置恢复为默认值 7 年。选择删除(Delete)。
- 再次选择删除(Delete)以确认操作。
使用 PowerShell 在 Teams for Business 中启用聊天历史记录(Enable Chat History in Teams for Business with PowerShell)
使用New-RetentionComplianceRule cmdlet 并将之前创建的策略的保留期限更改为无限制。这将覆盖任何持续时间较短的聊天保留策略。
New-RetentionComplianceRule -Name “Chat Delete Rule” -Policy “Teams Chat – No Retention” -RetentionComplianceAction Delete -RetentionDuration Unlimited
为什么我无法在 Teams Personal 中关闭聊天历史记录?(Why Can’t I Turn Off Chat History in Teams Personal?)
使用Microsoft Teams Personal时,没有可供您访问的Microsoft 365 合规中心。(Compliance Center)所以你不能禁用聊天记录。我们搜索了Microsoft的文档,但Microsoft没有说明您无法在Teams Personal中禁用聊天记录的原因。也许这就是为什么像Signal 安全消息(Signal secure messaging)这样的应用程序变得越来越流行的原因。
如何删除 Microsoft Teams 聊天记录?(How Do I Delete Microsoft Teams Chat History?)
也许你认为你可以删除你的聊天记录,然后就没有问题了。不幸的是,如果您删除整个聊天,它只会在您结束时删除。其他人,或参与群聊的人,仍将拥有整个聊天。他们也可以访问任何文件或链接。
但是,您可以进入OneDrive或您的 SharePoint 网站并更改共享或链接文档的权限以阻止访问。如果您使用OneDrive for Business,请进入Microsoft Teams 聊天文件的(Microsoft Teams Chat Files)OneDrive文件夹并删除您从那里共享的文件。此外,当您继续与他们聊天时,整个聊天对话都会回来。
可以删除个人聊天消息,并且根据Microsoft的说法,该消息将为您和其他人消失。
在 Teams 桌面应用程序中删除 Microsoft Teams Chat(Delete Microsoft Teams Chat in Teams Desktop App)
- 选择聊天的三点 ( ... ) 菜单,然后选择删除聊天(Delete chat)。
- 选择Yes, delete进行确认。
在 Teams Desktop 中删除 Microsoft Teams 聊天消息(Delete Microsoft Teams Chat Message in Teams Desktop)
- 找到要删除的消息。如果找不到邮件,请使用搜索栏和邮件中可能包含的字词。将鼠标悬停(Hover)在要删除的消息上,然后选择三点 ( … ) 菜单。
- 在弹出的菜单中,选择Delete。
您会看到该消息已被删除。要将其恢复,请选择撤消(Undo)。
对于与您聊天的人,该消息也应该消失,但是,这似乎并不一致。对话双方如下图所示。其他团队成员仍然可以看到已删除的消息。
在 Android Teams 应用中删除 Microsoft Teams Chat(Delete Microsoft Teams Chat in Android Teams App)
- 通过选择后退箭头转到对话历史记录列表。
- 长按要删除的对话。然后选择删除(Delete)。
在确认屏幕上选择OK进行确认。(OK)
在 Android Teams 应用中删除 Microsoft Teams 聊天消息(Delete Microsoft Teams Chat Message in Android Teams App)
- 长按要删除的聊天消息。如果找不到邮件,请使用搜索栏和邮件中可能包含的字词。
- 在打开的菜单中选择删除(Delete )。
- 选择DELETE(DELETE)进行确认。
在 iOS Teams 应用程序中删除 Microsoft Teams Chat(Delete Microsoft Teams Chat in iOS Teams App)
- 在聊天列表中,向左滑动要删除的聊天,然后选择更多(More)。
- 在向上滑动的菜单中,选择Delete。
- 在确认屏幕上选择是确认(Yes )
在 iOS Teams 应用程序中删除 Microsoft Teams 聊天消息(Delete Microsoft Teams Chat Message in iOS Teams App)
- 找到要删除的消息。如果您找不到邮件,请使用搜索框和邮件中可能包含的字词。长按要删除的聊天消息。
- 在向上滑动的菜单中选择删除消息(Delete Message)。
- 在删除消息(Delete message )确认屏幕上,选择删除(Delete)。
使用内容搜索删除所有 Microsoft Teams 聊天消息(Delete All Microsoft Teams Chat Messages with Content Search)
此方法要求您是电子数据展示管理器(Manager)组的成员。它仅适用于Exchange Online,不适用于本地Exchange。
- 登录到Office 365 安全与合规性(Office 365 Security & Compliance)并导航到搜索(Search )>内容搜索(Content search )并选择它。内容(Content)搜索将在新窗口中打开,可能需要您重新登录。
- 选择新搜索(New search)。
- 将搜索命名为“删除团队聊天(Delete Teams Chats )” ,然后选择“下一步”(Next )继续。
- 对于位置,选择Exchange 邮箱(Exchange mailboxes)。这是保存Microsoft Teams数据的地方。它默认为Included: All和Excluded: None。如果您只想为少数人执行此操作,请根据需要进行调整。完成后选择下一步(Next )。
- 在定义(Define)您的搜索条件页面上,选择条件卡生成器(Condition card builder ),然后选择添加条件(Add condition)。在打开的菜单中,选择Type。然后选择下一步(Next)。
- 在Type卡中,它默认为Equals any of。保持选中状态并检查即时消息(Instant messages ),然后选择Next。
- Microsoft 365让你有机会在创建搜索之前查看搜索条件。如果看起来不错,请选择提交(Submit)。这仅搜索消息。您必须使用PowerShell删除它们。
- 要使用PowerShell删除搜索结果,您需要拥有Exchange Online和安全(Security)与合规(Compliance)中心的管理员权限。首先(First)建立连接:
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
执行脚本时,会弹出一个窗口,询问您的用户名和密码。
- 使用合规性搜索操作查找与您的删除团队搜索(Teams Search)内容搜索匹配的所有内容并清除它们。清除类型HardDelete将搜索结果标记为在(HardDelete)托管文件夹助理(Managed Folder Assistant)处理后从邮箱中永久删除。
New-ComplianceSearchAction -SearchName “删除团队搜索” -Purge -PurgeType (New-ComplianceSearchAction -SearchName “Delete Teams Search ” -Purge -PurgeType )HardDelete
系统会询问您是否确定要删除所有内容。输入Y表示是。
- 如果这从未完成,则需要一段时间。要检查状态,请使用 cmdlet Get-ComplianceSearchAction。
控制 Microsoft Teams 聊天历史记录(Take Control of Microsoft Teams Chat History)
尽管没有简单的方法来禁用Teams聊天历史记录,但我们已经能够为你提供一些解决方法和方法来至少删除Teams聊天历史记录。毕竟,这才是真正的目标;摆脱消息历史记录。
让Microsoft知道您希望更好地控制Microsoft Teams 个人(Microsoft Teams Personal)数据。打开 Teams帮助(Help)并选择建议功能(Suggest a feature )或提供反馈(Give feedback)。
How to Enable or Disable Chat History in Microsoft Teams
Did you know that all Teams chat history іs recorded? Not just in thе workрlace but in the personal version too. Bυt can you turn off or disаble chat history in Microsoft Teams? If so, how can you turn Teams chat history off or turn it on again?
The short answer is maybe you can disable Microsoft Teams chat history with a workaround, and maybe you can delete your chat history too.
Disable Chat History in Teams for Business
All one-on-one chats in Microsoft 365 for business are retained in a hidden folder in your Outlook mailbox for eDiscovery, regulatory compliance, or training purposes. The default retention policy for Teams chat conversations is forever. However, you can change that by creating a new retention policy. To configure a retention policy, you need to be the global admin for your organization or have the permissions assigned to you by the global admin.
Disable Teams Chat History in Teams for Business with GUI
- Log in to the Microsoft 365 Compliance Center. Navigate to Policies > Retention. Select New retention policy.
- Name the policy something like Teams Chat – No Retention and select Next.
- The type of retention policy will default to Static. Leave it as that and select Next.
- Switch the Status for all Locations to Off, except Teams chats. Make sure that’s switched On. Here you can also set who is Included or Excluded from the policy. The defaults are Included: All users and Excluded: None. Select Next. If you want to stop retention of Teams channel messages or Teams private channel messages as well, turn those on too.
- To set retention to zero, select Only delete items when they reach a certain age. Notice that it says, “Items won’t be retained…”. That’s what you want and it deletes chats messages immediately. Under Delete items older than, select Custom.
In delete items older than, set years, months, and days to 0, then select Next.
- Microsoft 365 gives you the chance to review the retention policy settings. If you’re satisfied, select Submit. Note that it may take up to a day for the policy to take effect. Deletions are permanent.
Once it says Your policy was created select Done.
Disable Chat History in Teams for Business with PowerShell
PowerShell is a scripting language for Windows and Microsoft 365. To use this script, you must be the global admin for your organization or have the permissions assigned to you by the global admin.
Because Microsoft Teams chat retention policies are managed by Exchange Online, you must install the ExchangePowershellModule to use these cmdlets.
- Create the retention policy:
New-RetentionCompliancePolicy -Name “Teams Chat – No Retention” -TeamsChatLocation All -TeamsChatLocationException None -Enabled $true
- Set the rule in the policy to delete Teams conversations. Because retention duration is set for 0 days, chat history may exist for up to 24 hours:
New-RetentionComplianceRule -Name “Chat Delete Rule” -Policy “Teams Chat – No Retention” -RetentionComplianceAction Delete -RetentionDuration 0
Enable Chat History in Teams for Business
In Teams for Business, unless you change the retention policy, chat history is already enabled and chat messages are saved indefinitely.
Enable Chat History in Teams for Business with GUI
If you created the zero retention policy above, yet want to turn on retention and therefore chat history, you can edit or delete the policy. We’ll just delete it for this example.
- Log in to the Microsoft 365 Compliance Center. Navigate to Policies > Retention. Select Teams Chat – No Retention. Then you can select Edit, Delete, or Disable policy. Deleting or disabling the policy sets retention back to the default of 7 years. Select Delete.
- Confirm the action by selecting Delete again.
Enable Chat History in Teams for Business with PowerShell
Use the New-RetentionComplianceRule cmdlet and change the retention duration of the policy created earlier to unlimited. This will override any chat retention policy with a shorter duration.
New-RetentionComplianceRule -Name “Chat Delete Rule” -Policy “Teams Chat – No Retention” -RetentionComplianceAction Delete -RetentionDuration Unlimited
Why Can’t I Turn Off Chat History in Teams Personal?
With Microsoft Teams Personal, there isn’t a Microsoft 365 Compliance Center for you to access. So you can’t disable chat history. We’ve scoured Microsoft’s documentation but Microsoft doesn’t give a reason why you can’t disable chat history in Teams Personal. Maybe that’s why apps like Signal secure messaging are becoming more popular.
How Do I Delete Microsoft Teams Chat History?
Maybe you’re thinking you can just delete your chat history and then there’s no problem. Unfortunately, if you delete entire chats, it only does it on your end. The other person, or people involved in a group chat, will still have the whole chat. Any files or links also stay accessible to them.
However, you can go into OneDrive or your SharePoint site and change permissions on shared or linked docs to prevent access. If you use OneDrive for Business, go into your OneDrive folder to Microsoft Teams Chat Files and delete files that you shared from there too. Also, when you resume chatting with them, the whole chat conversation comes back.
Individual chat messages can be deleted and, according to Microsoft, the message will disappear for you and the other people.
Delete Microsoft Teams Chat in Teams Desktop App
- Select the three-dot (…) menu for the chat, then select Delete chat.
- Confirm by selecting Yes, delete.
Delete Microsoft Teams Chat Message in Teams Desktop
- Find the message to delete. If you can’t find the message, use the search bar and words that might be in the message. Hover over the message to delete and select the three-dots (…) menu.
- In the menu that pops up, select Delete.
You’ll see the message is deleted. To bring it back, select Undo.
The message should also be gone for the person you’re chatting with, however, that doesn’t seem to be consistent. Both sides of the conversation are shown below. The other team member can still see the deleted message.
Delete Microsoft Teams Chat in Android Teams App
- Go to the conversation history list by selecting the back arrow.
- Long press the conversation to be deleted. Then select Delete.
Confirm by selecting OK on the confirmation screen.
Delete Microsoft Teams Chat Message in Android Teams App
- Long press on the chat message to be deleted. If you can’t find the message, use the search bar and words that might be in the message.
- Select Delete in the menu that opens.
- Confirm by selecting DELETE.
Delete Microsoft Teams Chat in iOS Teams App
- In the chat listing, left swipe the chat to be deleted and select More.
- In the menu that slides up, select Delete.
- Confirm by selecting Yes on the confirmation screen
Delete Microsoft Teams Chat Message in iOS Teams App
- Find the message to be deleted. If you can’t find the message, use the search box and words that might be in the message. Long press on the chat message to be deleted.
- Select Delete Message in the menu that slides up.
- On the Delete message confirmation screen, select Delete.
Delete All Microsoft Teams Chat Messages with Content Search
This method requires you to be a member of the eDiscovery Manager group. It only works for Exchange Online, not for Exchange on-premises.
- Log in to Office 365 Security & Compliance and navigate to Search > Content search and select it. Content search will open in a new window and may require you to log in again.
- Select New search.
- Name the search something like Delete Teams Chats and select Next to continue.
- For locations, choose Exchange mailboxes. That’s where the Microsoft Teams data is held. It defaults to Included: All and Excluded: None. If you only want to do this for a few people, adjust these as needed. Select Next when done.
- On the Define your search conditions page, select Condition card builder and then select Add condition. In the menu that opens, select Type. Then select Next.
- In the Type card, it defaults to Equals any of. Leave it selected and check off Instant messages then select Next.
- Microsoft 365 gives you a chance to review your search criteria before you create the search. If it looks good, select Submit. This only searches out the messages. You must use PowerShell to delete them.
- To use PowerShell to delete the search results, you need admin access to Exchange Online and the Security & Compliance center. First establish a connection:
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
When executing the script, a pop-up will ask you for your username and password.
- Use a compliance search action to find everything matching your Delete Teams Search content search and purge them. The purge type HardDelete marks search results to be permanently removed from the mailbox once the Managed Folder Assistant processes it.
New-ComplianceSearchAction -SearchName “Delete Teams Search ” -Purge -PurgeType HardDelete
You’ll be asked if you’re sure you want to delete everything. Enter Y for yes.
- If this has never been done, it will take a while. To check the status, use the cmdlet Get-ComplianceSearchAction.
Take Control of Microsoft Teams Chat History
Although there’s no easy way to disable Teams chat history, we’ve been able to give you some workarounds and ways to at least delete Teams chat history. After all, that’s the real goal; to get rid of the message history.
Let Microsoft know that you’d like more control over Microsoft Teams Personal data. Open Teams Help and select Suggest a feature or Give feedback.