Forum Discussion
Jim Duncan
Jun 29, 2017Iron Contributor
Site Classification value in SharePoint Search
Does anyone know if the Group/Site Classification value for a site is available as a Crawled and/or Managed Property so that I can use it to build a search-driven experience based on site classification?
Thanks!
- Christophe HeureuxCopper Contributor
this article explains a workaround at site provisioning,
"You can use extension method Web.AddIndexedPropertyBagKey in the ObjectPropertyBagEntry.cs file inOfficeDevPnP.Core to store the classification values in site property bags instead of a list. The method enables property bags to be crawled or searchable."
- Jim DuncanIron Contributor
Thanks, Christophe.
While that is a great article, it is about a custom solution that a developer can build. I'm asking specifically about the built-in Classification labels in Office 365 Groups (which also get applied to the associated Team Site): https://drewmadelung.com/configuring-office-365-group-classification/
- Wim van DelftCopper Contributor
Hi Jim,
It's been a while since you've asked this question here. Now I would really like to do the same thing. Have you had any answers to make this work?
Thanks!
- Jim DuncanIron ContributorNo, I haven't :(
My guess is "No", but adding Mikael Svenson to comment on this
- Mikael SvensonSteel ContributorNot available last time I checked. Classification is stored on the Groups graph object and not on the SP site. So you could copy it over as an indexable prop bag value, but would be a sync job on your part. Might be better to query the MS graph instead of using SP search.
- Jim DuncanIron Contributor
Thanks, Mikael Svenson and jcgonzalezmartin.
I would really like to keep this as a Search-based solution as it has worked for us to this point.
The overall experience allows us to have a single page for internal and external users that provides quick access to the site(s) which the user has permission to access (in the case of External users, they only get one result).
From what I can tell, the classification value is available to CSOM as the Site.Classification property. Is this populated from the Graph at runtime or is it an actual property on the Site object? If the latter, can it not be picked up by the Crawler so that we can map it to a Managed Property?
I wonder if VesaJuvonen has any input...