Searching Sensitivity Labels in SharePoint
Searching Sensitivity Labels in SharePoint
Sensitivity labels are a powerful tool for protecting documents, offering features like watermarks, encryption, and access control at the file level. However, the default Sensitivity column in SharePoint has limitations—it cannot be filtered, indexed, or bulk updated. This blog post explores ways to search for sensitivity label values in SharePoint and highlights some challenges and potential solutions.
Challenges with Sensitivity Labels in SharePoint
The crawled managed property InformationProtectionLabelId
refers to the sensitivity label’s GUID/ID, which is not user-friendly for end users to easily search.
If you need to retrieve all files with a specific sensitivity label (e.g., “Confidential”) to ensure they are not stored in widely accessible SharePoint sites or libraries, PowerShell is currently the most reliable option. Refer to the script Get Files with Retention or Sensitivity Labels in SharePoint Online for an example of how to achieve this. The script uses the internal name _DisplayName
to retrieve sensitivity label values. This post covers the mapping of the _DisplayName to a refinable property.
Testing and Mapping Sensitivity Labels for Search
1. Map ows__displayName
to a Refinable String
The crawled property ows__displayName
can be mapped to a managed property like RefinableString00
to make it searchable.
Steps:
Identify the
ows__displayName
crawled property.Map
ows__displayName
toRefinableString00
.Test the search using the mapped refinable string.
2. Map Sensitivity
to a Refinable String
Another approach is to map the crawled property Sensitivity
to a managed property like RefinableString01
.
Steps:
Map the
Sensitivity
crawled property toRefinableString01
.Add
RefinableString01
to the search vertical to test filtering by sensitivity labels.
3. Test InformationProtectionLabelId
If needed, you can add the InformationProtectionLabelId
managed property to the search filter. This property refers to the sensitivity label’s GUID/ID.
Steps:
- Add InformationProtectionLabelId as search filter.
4. Validate Search Filters
Search filters may take up to 48 hours to propagate and appear within the search verticals. Once they are available, test the filters to ensure they work as expected.
Conclusion
While sensitivity labels provide robust document protection, their integration with SharePoint search has limitations. Mapping crawled properties like ows__displayName
to refinable strings can help make sensitivity labels searchable.
References
- Get Files with Retention or Sensitivity Labels in SharePoint Online
- Use Sensitivity Labels in SharePoint Search
- Overview of Crawled and Managed Properties in SharePoint Online
s