Skip to main content
< All Articles

How to search content tagged with a retention label using Purview Content Search

Posted on September 23, 2024
SharePoint

Here is a use case for you. You had created a retention label and published it to various locations, and had it applied either automatically or by end users. And now, you would like to know all the items (files and folders) tagged with a specific retention label. Luckily, we can do so in Microsoft Purview Content Search.

What is Content Search?

Content Search is a feature available within Microsoft Purview that allows you to search and find content in SharePoint (sites) and Exchange (mailboxes). It is actually a pretty powerful feature that lets you not only to search for items tagged with specific retention labels, but also for items that contain specific keywords inside of the documents or the file names. For the purpose of this article, I will demonstrate how to find documents tagged with a specific retention label.

Step 1: Access Content Search

  1. Click on Microsoft 365 App Launcher > ComplianceContentsearchpurview1
  2. Under Solutions, click Content searchPurview Content Search

Step 2: Create Search Query

  1. Once you are in Content Search, click New searchContentsearchpurview3
  2. Give the search a name and click NextContentsearchpurview4
  3. Next, specify where you want to search. Since Content Search allows you to search for various types of content, you can search not just SharePoint sites, but also user mailboxes (emails). I plan to expand on this in later posts, but for now, let’s choose SharePoint sites as a location to search in.Purview Content Search
  4. You can also specify the specific site(s) where you want to search in. Click Next.Contentsearchpurview6
  5. On the next screen, you have to build a query. You can choose between Query builder or KQL query. I will explain all these options in future articles, but for now, let’s stick with Query builder, then click Add condition > Retention label.Purview Content Search
  6. To finish the query, choose the proper Operator (i.e., Equals any of) and type in the name of the retention label. Click Next.Purview Content Search
  7. On the next screen, review everything and click SubmitContentsearchpurview8
  8. You will receive a confirmation message.Contentsearchpurview9

Step 3: Access and Export the Search Results

  1. Next, you must wait a bit for the search query to execute itself. Once you see the Status value Completed, click on the search query itself.Contentsearchpurview10
  2. Under the Summary section, you will see the results and see if any results were found.Purview Content Search
  3. To export the results, click the Actions drop-down and choose Export results.Contentsearchpurview12
  4. On the next screen, choose settings on how you want your results exported and downloaded. In my case, I decided to not only download the search results report, but also include all versions of the files + download the files themselves and have them organized in a zipped folder. Click Export.Purview Content Search
  5. You will then receive a confirmation message. Click OK.Contentsearchpurview14

Step 4: Download the search results and files

  1. Once you configure the export/download options, you must head to the Export tab within Content Search. Then click on the search query itself.Contentsearchpurview15
  2. On the next screen, you will be able to download the results. First, copy the key (think of it as a temporary password). Next, click on Download results.Purview Content Search
  3. After you click on Download results, it will ask you to Open the file. Click Open.Contentsearchpurview18
  4. You will then need to install the Microsoft Office 365 eDiscovery Export Tool. Click Install.Contentsearchpurview19
  5. On the next screen, you will need to type in the temporary key from above and set the destination for the zipped folder/files. Click Start.Contentsearchpurview20
  6. You will then see the progress bar…Contentsearchpurview21
  7. Once completed, click Close.Purview Content Search

Step 5: Review the Search Results

  1. Once it downloads the zipped folder, you will see several files in there. The Results Excel document summarizes all documents that met a search query (in our case, all files with a retention label). The SharePoint folder contains the downloaded files themselves.Contentsearchpurview23
  2. If you open the Results Excel document, you will see the document summary matching the search query. It will also provide additional information about the files (exact location, last modified date, etc.)Purview Content Search
  3. If you open the SharePoint folder and drill through a few subfolders, you will see the downloaded files themselves. It does tell you also which library the files were obtained from (i.e., in my case, it found documents in Shared Documents (default document library), Invoices document library, and Preservation Hold Library)Contentsearchpurview25
  4. This is what the contents of one of the document libraries above looks likeContentsearchpurview26

Important Notes/Nuances about Content Search in Microsoft Purview

  • To be able to access Content Search, you must have proper access to Microsoft Purview and a license
  • If you are executing the search, there is no need for you to have access to the Sites or mailboxes being searched. It searches the sites you do not even have access to!!!
  • To export/download search results/documents, you must use Microsoft Edge. Otherwise, you will get the below error message when clicking on the Download results button we did in Step 4.Purview Content Search
  • You can also use the Content Search Option to find files with certain names and content – I will explain how this works in future articles.

About Me

I’m Greg Zelfond, a U.S. based SharePoint consultant, and I provide affordable out-of-the-box SharePoint consulting, training, and configuration assistance to small and medium-sized businesses all over the world.

Need help?