Mar 11 2018 03:16 PM
Mar 11 2018 03:16 PM
In the Library UI it's possible to set a default compliance tag for a library using the hold.aspx page that is exposed through the "Apply a label to items in this library" option in the library settings menu.
We can set an item to have a particular compliance tag through CSOM, but I can't see anywhere in the CSOM library that allows us to configure the default for an entire library.
I'm in the process of configuring a large DMS solution for a client and having the ability to set this through CSOM or PoSH would save an immense amount of time.
Mar 12 2018 01:31 AM
We're currently implementing a DMS too and this was also a requirement for us. I've checked the possibilities last week. Unfortonately, CSOM currently doesn't provide a way to set this property at the library-level (only at Item-level like you said). I've noticed (after configuring though the browser) the property is ultimately stored in the List's Schema XML but CSOM doesn't provide a way to modify this Schema directly.
I bet for now your only option to modify this setting in an automated way, would be through the HTTP Remote Operation pattern described in @Vesa Juvonen's blog below:
Mar 12 2018 01:37 AM
Mar 14 2018 02:56 AM
Mar 14 2018 03:07 AM
After changing the setting at the library-level I noticed a ComplianceTag attribute appearing in the SchemaXml
Mar 14 2018 03:54 AM - edited Mar 14 2018 03:55 AM
Found it now :) Doesn't help though. Guess the List CSOM object have to expose the ComplianceTag property. Or expose a method in Microsoft.Office.Client.Policy for setting this. cc @Vesa Juvonen
Mar 19 2018 06:21 AM
This property is not indeed exposed from the List using CSOM or REST. ComplianceTag can be found at the ListItem level, but that's not really what's being looked here. Basically, that means that there's no API to currently set this property for the List object.
Mar 19 2018 06:25 AMSolution
I added a user voice for this: https://sharepoint.uservoice.com/forums/329220-sharepoint-dev-platform/suggestions/33679303-support-...
@Paul Hunt - Cimares feel free to upvote :)
May 09 2018 06:50 AM
An old topic, but I forgot to come back and say it's been done.. the Uservoice has been updated.
Kudos to the MS dev team for switching this on so quickly!
Jul 10 2018 03:34 AM
@Vesa Juvonen How can I use those new methods in the updated CSOM if I don't have developer tools such as VS installed? (I'm not a dev) - do I have to wait for the Client Components SDK to be updated?
Jul 10 2018 04:18 AM
You could look at installing the command line version of NUGET. This allows you to always pull down the latest version of DLLs without having to update the SDK.
That link shows the latest versions that are registered with Nuget. The Nuget tool itself is pretty simple to use if you're ok with PowerShell/cmd line stuff.
Nice write up there on setting it up.