Edisc Search Teams Data
In brief
The documentation now specifies that `teamsMessages` purges permanently delete Teams messages, regardless of `purgeType`. Mailbox and Teams purges require separate requests, with Teams purged first; the API returns a `202 Accepted` response with a status URL.
What Purview admins need to know
Administrators using Graph must select the correct purge area, avoid combined values, and follow the required order to prevent irreversible or incomplete deletion.
Summaries are generated from the documentation change itself.
Documentation change
The comparison below shows only the changed extract. Use the full-page view for complete context.
Microsoft Teams chat data is stored in separate copies, one for compliance purposes (used by tools like eDiscovery) and one for user access.
Soft delete or hard delete operations remove the user copy permanently and can't be recovered for user use.
Important
Cmdlet-based purges of Teams messages can remove only the compliance** copy ofstoredinthe **mailbox. The Teams messages, butmessage isn't removed from the user copyTeams service and remains visible.visible to the user. After the compliance copy is deleted, eDiscovery can no longer remove the user-visible Teams message. Verify Teams messages carefully before purging and avoidAvoid using cmdlets to purge Teams messages (the user copy isn't deleted).messages.
If** youuse
cmdlets,**cmdlets, review the export report and exclude Teamsitems. Deletes aremessages from the purge. Cmdlet-based purges remove onlyperformed onthe compliance copy and don't removecopiesthe message fromuser viewing. Deleting onlythecompliance copy also prevents any future deletion when usingTeams service.If** youuseMicrosoft **Graph
APIs.If you use Microsoft Graph to, review the report andensureverify that the Teamsitems beingmessages identified for deletion are intended to be deleted before performing the purge. When the purge targetsteamsMessages, the Teams messages areintentional, therepermanently deleted and can's no recovery of the items after the deletion is complete.
To ensure complete removal of items, plan your purge strategy carefully and understand which copy each deletion method targets.
Tip
After you confirm the correct case and search IDs, use the following request to purge the matching chat messages.
In Graph Explorer,
runset the request method to POST and enter the followingPOST requestendpoint to delete the items returned by the search that you created in Step 2.Use the valuehttps://graph.microsoft.com/v1.0/security/cases/ediscoveryCases/{ediscoveryCaseID}/searches/{ediscoverySearchID}/purgeDatain the address bar of the request query,where {ediscoveryCaseID} and {ediscoverySearchID} are the IDs that you obtained in the previous procedures.With this command, you must provide a request body that specifies the purge** area to target (
mailboxesorteamsMessages) and the purge **type (recoverableorpermanentlyDelete).{ "purgeType": "permanentlyDelete", "purgeAreas": "teamsMessages" }Important:
A.**
purgeAreasspecifiesthetargetforthepurge **request.- To purge Microsoft** Teams **messages, set
purgeAreastoteamsMessages. - To purge **Only thecompliancecopyofaTeamsmessagestoredintheuser's **mailbox, set
purgeAreastomailboxes. - Purging the compliance copy from the mailbox doesn't remove the message from the Teams service. The message remains visible to the user in Teams.
- If both the Teams** messageanditscompliancecopy need to be purged, use separatepurge **requests. Purge
teamsMessagesfirst, followed bymailboxes. Don't specify a combined value such asmailboxes,`` ``teamsMessages. - The order is important because after the compliance copy is purged from the mailbox, the Teams message can no longer be purged through eDiscovery.
B.** Theeffectof
purgeTypedependsontheselected **purgeAreas.- When
purgeAreasis set tomailboxes,purgeTypedetermines whether mailbox items are deleted usingrecoverableorpermanentlyDelete. - When
purgeAreasis set toteamsMessages, Teams messages are permanently** deletedregardlessofwhetherpurgeTypeissettorecoverable****orpermanentlyDelete**. In either case, the Teams messages can't be recovered.
If the POST request is
successful,successfully accepted, the API returns an HTTP**202****Accepted** response. The responsecode is displayed inincludes agreen banner statingLocationheader that provides therequest was accepted.URL for checking the status of the purge operation.- To purge Microsoft** Teams **messages, set
For more information about purgeData,this operation, including request-body parameters and examples, see sourceCollection: purgeDataediscoverySearch: purgeData.
Delete chat messages with PowerShell
@@ -59,13 +59,15 @@ You can use eDiscovery and the Microsoft Graph Explorer to search for and delete
Microsoft Teams chat data is stored in separate copies, one for compliance purposes (used by tools like eDiscovery) and one for user access.
-- **Soft delete or hard delete operations** remove the user copy permanently and can't be recovered for user use.
-- **Cmdlet-based purges** of Teams messages can remove the compliance copy of Teams messages, but the user copy remains visible. After the compliance copy is deleted, eDiscovery can no longer remove the user-visible message. Verify Teams messages carefully before purging and avoid using cmdlets to purge Teams messages (the user copy isn't deleted).
+- **Soft delete or hard delete operations** remove the user copy permanently and can't be recovered for user use. **Important**
- - If you use cmdlets, review the export report and exclude Teams items. Deletes are only performed on the compliance copy and don't remove copies from user viewing. Deleting only the compliance copy also prevents any future deletion when using Microsoft Graph APIs.
- - If you use Microsoft Graph to review the report and ensure Teams items being deleted are intentional, there's no recovery of the items after the deletion is complete.
+Cmdlet-based purges of Teams messages remove only the **compliance**\*\* **copy** **stored** **in** **the** \*\***mailbox**. The Teams message isn't removed from the Teams service and remains visible to the user. After the compliance copy is deleted, eDiscovery can no longer remove the user-visible Teams message. Avoid using cmdlets to purge Teams messages.
-To ensure complete removal of items, plan your purge strategy carefully and understand which copy each deletion method targets.
+- **If**\*\* **you** **use** \*\***cmdlets**, review the export report and exclude Teams messages from the purge. Cmdlet-based purges remove only the compliance copy and don't remove the message from the Teams service.
+
+ - **If**\*\* **you** **use** **Microsoft** \*\***Graph**, review the report and verify that the Teams messages identified for deletion are intended to be deleted before performing the purge. When the purge targets `teamsMessages`, the Teams messages are permanently deleted and can't be recovered.
+
+ To ensure complete removal of items, plan your purge strategy carefully and understand which copy each deletion method targets.
Tip
@@ -174,11 +176,35 @@ Next, retrieve the ID of the search that contains the chat messages you want to
After you confirm the correct case and search IDs, use the following request to purge the matching chat messages.
-1. In Graph Explorer, run the following POST request to delete the items returned by the search that you created in Step 2. Use the value `https://graph.microsoft.com/v1.0/security/cases/ediscoveryCases/{ediscoveryCaseID}/searches/{ediscoverySearchID}/purgeData` in the address bar of the request query, where *{ediscoveryCaseID}* and *{ediscoverySearchID}* are the IDs that you obtained in the previous procedures.
+1. In Graph Explorer, set the request method to **POST** and enter the following endpoint to delete the items returned by the search that you created in Step 2. `https://graph.microsoft.com/v1.0/security/cases/ediscoveryCases/{ediscoveryCaseID}/searches/{ediscoverySearchID}/purgeData` where *{ediscoveryCaseID}* and *{ediscoverySearchID}* are the IDs that you obtained in the previous procedures.
+
+ With this command, you must provide a request body that specifies the **purge**\*\* **area to target (`mailboxes` or `teamsMessages`) and the purge** \*\***type** (`recoverable` or `permanentlyDelete`).
+
+ ```json
+ {
+ "purgeType": "permanentlyDelete",
+ "purgeAreas": "teamsMessages"
+ }
+ ```
+
+ **Important:**
+
+ **A.**\*\* **`purgeAreas`** **specifies** **the** **target** **for** **the** **purge** \*\***request.**
+
+ - To purge **Microsoft**\*\* **Teams** \*\***messages**, set `purgeAreas` to `teamsMessages`.
+ - To purge \*\*Only **the** **compliance** **copy** **of** **a** **Teams** **message** **stored** **in** **the** **user's** \*\***mailbox**, set `purgeAreas` to `mailboxes`.
+ - Purging the compliance copy from the mailbox doesn't remove the message from the Teams service. The message remains visible to the user in Teams.
+ - If both the **Teams**\*\* **message** **and** **its** **compliance** **copy need to be purged, use separate** **purge** \*\***requests**. Purge `teamsMessages` first, followed by `mailboxes`. Don't specify a combined value such as `mailboxes,`` ``teamsMessages`.
+ - The order is important because after the compliance copy is purged from the mailbox, the Teams message can no longer be purged through eDiscovery.
+
+ **B.**\*\* **The** **effect** **of** **`purgeType`** **depends** **on** **the** **selected** \*\***`purgeAreas`.**
+
+ - When `purgeAreas` is set to `mailboxes`, `purgeType` determines whether mailbox items are deleted using `recoverable` or `permanentlyDelete`.
+ - When `purgeAreas` is set to `teamsMessages`, Teams messages are **permanently**\*\* **deleted** **regardless** **of** **whether** **`purgeType`** **is** **set** **to** **`recoverable`** \*\*\*\*or`permanentlyDelete`\*\*. In either case, the Teams messages can't be recovered.
- If the POST request is successful, an HTTP response code is displayed in a green banner stating that the request was accepted.
+ If the POST request is successfully accepted, the API returns an **HTTP**\*\* **`202`**\*\*\*\*`Accepted`\*\* response. The response includes a `Location` header that provides the URL for checking the status of the purge operation.
-For more information about purgeData, see [sourceCollection: purgeData](/en-us/graph/api/ediscovery-sourcecollection-purgedata).
+ For more information about this operation, including request-body parameters and examples, see [ediscoverySearch: purgeData](/en-us/graph/api/security-ediscoverysearch-purgedata).
### Delete chat messages with PowerShell
