Jun 26 2020 01:38 PM
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
May 26 2021 01:34 PM
Jun 10 2021 02:39 AM
Jun 10 2021 06:20 AM
@Sanjoyan Mustafi , thanks for the confirmation! BTW, two more questions if you don't mind:
Nov 08 2021 07:00 PM
Jan 04 2022 11:11 AM
Jan 04 2022 11:23 AM
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...
Oct 03 2023 06:54 AM
@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.