Forum Discussion

Sanjoyan Mustafi's avatar
Jun 26, 2020

Searching documents with "Sensitivity" Label-ID

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

  • gw_ap320's avatar
    gw_ap320
    Copper Contributor
    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's avatar
        gw_ap320
        Copper Contributor

        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?
  • grahamcaparulo's avatar
    grahamcaparulo
    Copper Contributor

    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.

Resources