Does Microsoft Search API(/search/query) work only with delegated access token?

captain_atharv 511 Reputation points
2022-06-06T08:11:04.053+00:00

Hi,

I'm facing issues while using Microsoft Search API(https://learn.microsoft.com/en-us/answers/questions/872976/microsoft-search-api-errors-out-with-value-cannot.html).
It is working on Graph Explorer where the token is delegated one.
So, I would like to confirm if Search API only works with delegated access token or it can work with app-only tokens("grant_type":"client_credentials") as well?

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} vote

Accepted answer
  1. CarlZhao-MSFT 46,376 Reputation points
    2022-06-06T08:55:39.723+00:00

    Hi @captain_atharv

    Yes, search query currently only support delegated permissions, this endpoint is not yet available for application context. You can follow the graph changelog for any updates to this endpoint.

    208723-image.png


    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.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

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.