Searching documents with "Sensitivity" Label-ID

Microsoft

Well we have made the field "InformationProtectionLabelId" as Managed Property. So as a App or a User if you want a list of files having a specific label you can simply search using the label's GUID. Like below:

 

Use like below in SharePoint search box
InformationProtectionLabelId: 2702e115-d7fc-4912-b15b-a9b7662b1476

 

To use search API do below:

https://<your domain>/_api/search/query?Querytext=%27InformationProtectionLabelId=<guid of the label>

That's how you use the search API to search for ALL contents with a specific label

7 Replies
Thanks for the info, it's very helpful to identify sensitive files in our environment. However, we noticed that this search can only work for Office files. Is there a plan to include other file types in the search index as well?
@gw_ap320: In future we ill include PDF.

@Sanjoyan Mustafi , thanks for the confirmation! BTW, two more questions if you don't mind:

  1. Will other file types be supported too? (we have some sensitive files not in Office and PDF format, want to have visibility as well)
  2. Is there a rough ETA for the support?
PDF support is finally coming in March 2022!!!!
https://www.microsoft.com/en-nz/microsoft-365/roadmap?filters=&searchterms=pdf%2Clabel

No mention of support for other file types :(
Files that do not have Metadata storage is difficult to just label as there is no place to store the label. Like a txt file. These files can only be encrypted. With Word, Excel, PowerPoint and PDF we will cover 90% of most commonly used files ( that has metadata).

@Sanjoyan Mustafi 

True, but given that .pfile, .ptxt, etc are MS' own format, they could hold metadata.

In our particular situation, we're storing everything in SharePoint Online, which also has metadata capabilities...

@Sanjoyan Mustafi how often is metadata crawled and the index updated.  We're noticing that search results for specific LabelID included content which at one time had the searched on labelID, but no longer does.