You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: CSOM methods are available to apply (set) a retention label (ComplianceTag) on one or many items (ListItems) in SharePoint.
2
4
author: kyracatwork
3
5
ms.author: kyrachurney
4
6
ms.date: 4/18/2023
5
-
title: CSOM methods for applying retention labels
6
-
description: CSOM methods are available to apply (set) a retention label (ComplianceTag) on one or many items (ListItems) in SharePoint.
7
+
ms.prod: sharepoint
7
8
---
8
9
9
10
# CSOM methods for applying retention labels (setting ComplianceTags)
10
11
11
-
Retention labels let you apply retention settings for governance control at the item level, and are part of the Microsoft Purview compliance solutions. [Learn more about retention labels.](/microsoft-365/compliance/retention?view=o365-worldwide#retention-labels)
12
+
Retention labels let you apply retention settings for governance control at the item level, and are part of the Microsoft Purview compliance solutions. [Learn more about retention labels.](/microsoft-365/compliance/retention#retention-labels)
12
13
13
14
Retention labels may classify contents as records, which place restrictions on what actions are allowed or blocked. [Learn more about declaring records by using retention labels](/microsoft-365/compliance/declare-records)
14
15
@@ -21,7 +22,6 @@ CSOM methods are available to apply (set) a retention label (ComplianceTag) on o
21
22
22
23
This method can be used to set a ComplianceTag on one or many ListItems. It is strongly recommended to use this method for this purpose.
23
24
24
-
25
25
```c#
26
26
publicList<int>SetComplianceTagOnBulkItems(
27
27
List<int>itemIds,
@@ -31,13 +31,10 @@ public List<int> SetComplianceTagOnBulkItems(
It is strongly recommended to use SetComplianceTagOnBulkItems instead of these methods.
50
+
> It is strongly recommended to use SetComplianceTagOnBulkItems instead of these methods.
54
51
55
52
The following methods are also available, but are no longer updated and may be subject to deprecation in the future. If you are using these methods, we strongly recommend use of the SetComplianceTagOnBulkItems method instead.
0 commit comments