Skip to content

Latest commit

 

History

History
116 lines (81 loc) · 4.11 KB

File metadata and controls

116 lines (81 loc) · 4.11 KB
title driveItem: removeRetentionLabel
description Remove a retention label from a driveItem.
author kyracatwork
ms.localizationpriority medium
ms.subservice onedrive
doc_type apiPageType
ms.date 11/06/2025

driveItem: removeRetentionLabel

Namespace: microsoft.graph

Remove a retention label from a driveItem.

For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.

[!INCLUDE national-cloud-support]

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

Note

Sites.FullControl.All is the least privileged permission required to remove retention labels that classify the content as records.

[!INCLUDE app-permissions]

HTTP request

DELETE /drives/{drive-id}/items/{item-id}/retentionLabel

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 204 No Content response code. It doesn't return anything in the response body.

Examples

Request

The following example shows a request.

DELETE https://graph.microsoft.com/v1.0/drives/b!t18F8ybsHUq1z3LTz8xvZqP8zaSWjkFNhsME-Fepo75dTf9vQKfeRblBZjoSQrd7/items/01NKDM7HMOJTVYMDOSXFDK2QJDXCDI3WUK/retentionLabel

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

The following example shows the response.

HTTP/1.1 204 No Content