Forum Discussion
Configure default Office 365 Label for library
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.
Paul.
I added a user voice for this: https://sharepoint.uservoice.com/forums/329220-sharepoint-dev-platform/suggestions/33679303-support-compliancetag-on-the-csom-list-object
Paul Hunt - Cimares feel free to upvote :)
11 Replies
- paulpaschaBronze Contributor
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 VesaJuvonen's blog below:
https://blogs.msdn.microsoft.com/vesku/2013/11/04/ftc-to-cam-advance-http-remote-operations-for-sp2013/
And also:
https://www.youtube.com/watch?v=eoLIDCZgMH4
- Mikael SvensonIron ContributorHi,
Where in the list schema are you seeing this? I cannot see any changes to the schemaxml after setting the value back and forth.- paulpaschaBronze Contributor
After changing the setting at the library-level I noticed a ComplianceTag attribute appearing in the SchemaXml
- I was hoping to avoid screen scraping if possible but it was going to be my fall back option. It’s just a little messy and prone to issues.
Hopefully a fully supported option will be added to csom and other methods soon.
Paul.