Building custom solutions that extend, automate, and integrate Microsoft 365 apps.
Hi @HungWu,
Welcome to Microsoft Q&A, and thank you very much for reaching out.
Based on your description, the Q&A Assist response is generally correct. That said, I’d like to clarify a few points to better address your questions.
First, according to Microsoft documentation, the Microsoft Graph Search API relies on the Microsoft Search index, which is designed for relevance-based discovery, not compliance-grade enumeration.
Additionally, Microsoft documentation notes that even when using refined queries with aggregations, the returned counts are approximate and do not represent an exact number of matches. Because of this behavior, the Search API is not reliable if your goal is to discover all files precisely, as results are approximations rather than a guaranteed complete set.
Because of this, the Search API should be considered best‑effort, not authoritative, for discovering all files that meet a specific compliance condition such as a sensitivity label.
Regarding a cap on the total number of results, from my research, Microsoft does not document any explicit limit. As such, there is no confirmed maximum, but there is also no guarantee that paging will return every matching item, as the returned counts are approximate.
For a more reliable approach, especially for compliance or sensitivity‑label scenarios, you may consider:
- Enumerating content directly via Microsoft Graph, reading each file’s
sensitivityLabelmetadata, and optionally callingextractSensitivityLabelsto ensure the metadata is up to date. - Using Microsoft Purview for compliance‑related scenarios, as it is built on backend compliance pipelines and is the recommended solution for sensitivity and governance reporting.
Regarding the required region field, As I checked, Microsoft Graph does not currently provide a supported way to query or enumerate all regions. When using application permissions, Microsoft Graph Search API is limited to one geographic region per request, and there is no supported mechanism to perform a single search across all regions.
I hope this helps.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.