Microsoft Graph Search API not availalbe with Application permission

mohit tater 1 Reputation point
2021-11-19T11:19:39.93+00:00

I want to use Microsoft Graph search APIs via a client app, I have enabled all the relevant permissions but I am not able to query the data using those permissions.

I always get the following error

{"error": {"code": "System.UnauthorizedAccessException", "message": "Application Permission is not supported.", "innerError": {"date": "2021-11-18T08:46:06", "request-id": "75bc23c7-a080-4eaf-9116-1223e54f3641", "client-request-id": "75bc23c7-a080-4eaf-9116-1223e54f3641"}}}
 

I am using /search/query endpoint with entityTypes as ["site"]. For this I have enabled both Sites.Read.All (app and delegated) permissions.

To me it seems like these endpoint(/search) is not available behind application permissions, just wanted a confirmation on this as it is not very clear from documentation.

Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Danstan Onyango 3,906 Reputation points Microsoft Employee
    2021-11-22T06:21:39.747+00:00

    This is documented here searchEntity: query.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.