Share via

Microsoft Search API doesn't work for different users

captain_atharv 511 Reputation points
2022-06-06T14:35:56.787+00:00

Hi,

I'm trying to search using Microsoft Search API(/search/query).
When I get access token using admin username/password and search, I'm able to see search results. But when I'm searching for the same term with other user, I'm getting 0 search results.
I'm not sure what's the difference between both users or even where to look for those differences.

Can someone please help with this?

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Graph

Answer accepted by question author

Mehtab Siddique (MINDTREE LIMITED) 971 Reputation points
2022-06-08T07:01:53.68+00:00

Hi @captain_atharv ,

There is no specific permission to used to getting the access token.

If you want to get a new access token while using the other access token , please refer this: https://learn.microsoft.com/en-us/graph/auth-v2-user#5-use-the-refresh-token-to-get-a-new-access-token.

The permissions required for accessing this API is : https://learn.microsoft.com/en-us/graph/api/search-query?view=graph-rest-1.0#permissions

----------

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

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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