Fix KQL Works in SharePoint Search but Not in Purview Auto-Labeling
Question details
Users need to resolve an issue where KQL queries successfully return results in SharePoint Search but fail to function in Microsoft Purview Auto-Labeling or eDiscovery.

- Product
- Microsoft Purview / SharePoint
- Device & OS
- not provided
- Scenario
- Configuring auto-labeling policies in Microsoft Purview using KQL queries to automatically classify and protect SharePoint data.
- Observed behavior
- The KQL queries fail to return results or trigger policies in Purview and eDiscovery because they rely on custom or crawled managed properties, which are unsupported in those environments.
Ensure you have global administrator or search administrator permissions in the SharePoint Admin Center, as well as the necessary compliance administrator roles in Microsoft Purview to modify search schemas and auto-labeling policies.
Map SharePoint Columns to Supported Refinable Properties
Microsoft Purview auto-labeling does not support crawled or custom properties. You must map your target columns to predefined RefinableString managed properties.
To ensure Microsoft Purview can process your KQL queries, you must utilize the built-in RefinableString00 through RefinableString99 managed properties instead of relying on custom-created properties.
Navigate to the SharePoint Admin Center, select 'More features', and open the 'Search' section. Click on 'Manage Search Schema'.
Search for an unused predefined managed property, such as 'RefinableString01', and click to edit it.
Scroll down to 'Mappings to crawled properties', click 'Add a Mapping', search for the specific SharePoint column (crawled property) you want to use, and map it.
Ensure that the managed property is set to 'Queryable' and 'Retrievable', then save the configuration.
Trigger a re-index of the relevant document library or site and wait for the crawling process to complete before testing your Purview policy.

Correct Query Syntax and Remove Aliases
Using property aliases or incorrect syntax for values with spaces will cause auto-labeling KQL queries to fail in Purview.
Resolve SharePoint Site Corruption and Hold Library Issues
Corrupted SharePoint sites or incorrectly functioning hold libraries with conflicting older retention labels can silently block Purview auto-labeling.
Boost Your Productivity Securely with WPS Office
While Microsoft Purview and SharePoint manage your enterprise data compliance on the backend, you need a reliable, lightweight suite for your daily document tasks. WPS Office offers a powerful, cost-effective alternative to Microsoft Office, letting you create and edit documents offline or online without heavy administrative overhead.
- 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install and Launch: Run the installation file and launch WPS Office. The familiar interface ensures no learning curve is required.
- 3. Open Existing Office Files: Click 'Open' and seamlessly edit your existing Word, Excel, and PowerPoint files with full format compatibility.

Frequently Asked Questions
Why do custom managed properties work in SharePoint Search but not in Microsoft Purview?
Microsoft Purview auto-labeling and eDiscovery engines are designed to only process predefined managed properties like RefinableString00 to RefinableString99 for consistent and scalable data mapping. Custom or crawled properties are strictly unsupported in these environments.
How long does it take for auto-labeling KQL queries to process in Purview?
Processing times can vary significantly depending on the size of the SharePoint site. It typically takes a few hours, but in large environments or during initial indexing, the simulation or labeling service may run for more than two days before completing.
Can I use property aliases in my Purview auto-labeling KQL policy?
No. While SharePoint Search might recognize a configured alias, Purview auto-labeling policies require you to use the actual underlying managed property name, such as 'RefinableString01', to accurately parse the condition.




