Forum Discussion
How to get available classification labels with CSOM?
Hi Gabriel,
I just read your post, did you manage to get a solution to access labels? I tried at my end as well but could not succeed.
Thanks
Rahul
- Rahul SrivastavaOct 17, 2017Copper Contributor
Hi Gabriel,
Thanks for your response, my library is showing up the labels. But my requirement is how to get the label value that is applied to my site. For example if my site has been classified as highly confidential, then I need to generate a report which list down all the sites that are highly confidential.
The CSOM release shows a method (public method Microsoft.SharePoint.Client.CompliancePolicy.SPPolicyStoreProxy.GetAvailableTagsForSiteLabel). I tried using this method but getting the count as 0.
- Gabriel SmoljarOct 17, 2017Brass ContributorThen I am afraid I do not know. I was trying to get the classification label from individual documents. I suggest you start a new thread.
- Rahul SrivastavaOct 17, 2017Copper Contributor
Hi Gabriel,
Thanks for your post, I was able to find my answer. A SharePoint site object has a property classification which provided the desired result in my case.