Graph Search Files by Content with Sites.Selected Permission (App Auth Token)

Evan Robert Grillo 20 Reputation points
2023-12-06T21:05:45.51+00:00

With the app token, can query Sharepoint (sites, drives, folders, files, etc) with Sites.Selected permission.

However, getting errors like 403 with search queries (i.e. searching file content)

Can you point to where in the documentation I overlooked?

Is this feature supported with Sites.Selected? If not, which permission is required to enable it?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,154 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,084 questions
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 32,876 Reputation points Microsoft Vendor
    2023-12-07T07:06:20.7433333+00:00

    Hi @Evan Robert Grillo,

    Per the document, you will need at least Files.Read.All permission.

    https://learn.microsoft.com/en-us/graph/api/search-query?view=graph-rest-1.0&tabs=http

    Please check if you have granted the permission in Sites.Selected.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.


0 additional answers

Sort by: Most helpful