Update retentionLabel

Namespace: microsoft.graph.security

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Update the properties of a retentionLabel object.

To update a disposition review stage, include the actionAfterRetentionPeriod property in the request body with one of the possible values specified.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

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.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) RecordsManagement.ReadWrite.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application Not supported. Not supported.

HTTP request

PATCH /security/labels/retentionLabels/{retentionLabelId}

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, supply only the values for properties that should be updated. Existing properties that aren't included in the request body maintains their previous values or be recalculated based on changes to other property values.

The following table specifies the properties that can be updated.

Property Type Description
descriptionForAdmins String This is an optional property that provides the label information for the admin.
descriptionForUsers String This is an optional property that provides the label information for the user.
dispositionReviewStages microsoft.graph.security.dispositionReviewStage collection Review stages during which reviewers are notified to determine whether a document must be deleted or retained.
retentionDuration microsoft.graph.security.retentionDuration Specifies the number of days to retain the content.
defaultRecordBehavior microsoft.graph.security.defaultRecordBehavior Specifies the locked or unlocked state of a record label when it is created.The possible values are: startLocked, startUnlocked, unknownFutureValue.
labelToBeApplied String Specifies the replacement label to be applied automatically after the retention period of the current label ends.

Response

If successful, this method returns a 200 OK response code and an updated microsoft.graph.security.retentionLabel object in the response body.

Examples

Request

PATCH https://graph.microsoft.com/beta/security/labels/retentionLabels/{retentionLabelId}
Content-Type: application/json
Content-length: 555

{
  "@odata.type": "#microsoft.graph.security.retentionLabel",
  "retentionDuration": {
    "@odata.type": "microsoft.graph.security.retentionDuration"
  },
  "descriptionForAdmins": "String",
  "descriptionForUsers": "String",
  "labelToBeApplied": "String",
  "defaultRecordBehavior": "String"
}

Response

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-Type: application/json

{
  "@odata.type": "#microsoft.graph.security.retentionLabel",
  "id": "64a99fb4-07be-0481-8746-44c15c0eef1f",
  "retentionDuration": {
    "@odata.type": "microsoft.graph.security.retentionDuration"
  },
  "descriptionForAdmins": "String",
  "descriptionForUsers": "String",
  "labelToBeApplied": "String",
  "defaultRecordBehavior": "String"
}