Compliance Problems

Use KQL in Microsoft Purview Content Search

Jason MillerJason Miller Nov 20, 2026 868 views

Question details

The user wants to create a Content Search using KQL and understand whether a command line is needed to edit the query.

How to Use KQL in Microsoft Purview Content Search
Product
Microsoft Purview Content Search
Device & OS
not provided
Scenario
The user wants to search Microsoft 365 content using keywords and search conditions.
Observed behavior
The user needs to know where to enter KQL and how search conditions contribute to the query.
Before you start

Sign in to Microsoft Purview with an account that has permission to create and run content searches. Identify the mailboxes or sites to search and check Microsoft's documentation for supported KQL properties.

Solution 1Recommended

Enter KQL in the Content Search interface

Use the search interface to enter keywords and add conditions without a command line.

1
Open the search tool

Sign in to the Microsoft Purview portal and open Content search or eDiscovery, depending on your portal version. Create a new search.

2
Choose locations

In the search setup, select the mailboxes, sites, or other available locations you want to search.

3
Enter keywords

In the Keywords field, type search terms or a supported KQL expression, such as subject:"Quarterly report".

4
Add conditions

Select Add condition and choose available properties, such as a date or sender, to narrow the search. The conditions contribute clauses to the query.

5
Run the search

Review the query and selected locations, then select the option to run the search. Review the results in the portal.

Enter KQL in the Content Search interface
Portal labels may vary: Microsoft has moved compliance tools into Microsoft Purview. Navigation and available search options can differ by portal version, license, and permissions.
Free Microsoft Office alternative

Review Office Documents with WPS Office

WPS Office is a free, lightweight alternative for working with Office documents. Its familiar interface and format support make it easy to move everyday document work from Microsoft Office. It does not run Microsoft Purview compliance searches.

Open and review documents relevant to your content-search workflowCompatible with Microsoft Word, Excel, and PowerPoint formatsUse a familiar interface for everyday document editingMove common Office files into a lightweight workspace
microsoft office alternative - wps office

Frequently Asked Questions

Do I need a command line to run KQL in Content Search?

No. Enter keywords or a KQL expression directly in the search's Keywords field, and use Add condition to narrow the search.

How do search conditions affect the KQL query?

Each condition selected in the search interface contributes a clause to the query. Review the supported properties and syntax in Microsoft's KQL documentation.

Can I edit an existing search from PowerShell?

If your environment supports the command and you have the required permissions, connect with Connect-IPPSSession and use Set-ComplianceSearch with the search identity and ContentMatchQuery parameter.

Why can't I find Content Search in the old Security and Compliance Center?

Microsoft has moved compliance tools into Microsoft Purview. Look for Content search or eDiscovery in the Purview portal, and check that your account has the required permissions.