sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Graph Search API - Searching Sites fails with Application Permissions inconsistently

Open dmoorjmalani opened this issue 3 years ago • 5 comments

I am trying to search SharePoint sites using Graph Search with Application Permissions, the call fails with error given below 9 out of 10 times, following is my payload, Request type: Post Request URL: https://graph.microsoft.com/v1.0/search/query Request body: { "requests": [ { "entityTypes": [ "site" ], "query": { "queryString": "contoso", }, "region": "EMEA" } ] }

Following is the response that i get, { "error": { "code": "InternalServerError", "message": "The call failed, please try again.", "target": "", "details": [ { "code": "InternalServerError", "message": "The call failed, please try again.", "target": "", "details": [ { "code": "FanoutExternalTimeoutException", "message": "The call failed, please try again.", "target": "", "details": [ { "code": "TwoStepFanout_FirstStepFailed", "message": "The call failed, please try again.", "target": "", "serviceName": "Xap", "moduleName": "SubstrateSearch.FanoutV2.MultiDimensionSearchFanoutPluginV2", "contactTeam": "3sdri", "httpCode": 500 }, { "code": "FanoutExternalTimeoutException", "message": "The call failed, please try again.", "target": "", "serviceName": "FanoutService", "moduleName": "Fanout", "contactTeam": "ShardSearchDRI", "httpCode": 500 } ], "serviceName": "FanoutService", "moduleName": "Fanout", "contactTeam": "ShardSearchDRI", "httpCode": 500 } ], "moduleName": "SubstrateFanoutSearchWorkflow", "httpCode": 500 } ], "moduleName": "SearchAllTopLevelInternalWorkflow", "httpCode": 500 }, "Instrumentation": { "TraceId": "921cc798-aff6-7e6e-58d4-fa7a6844155a" } }


Document Details

⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

dmoorjmalani avatar Aug 03 '23 21:08 dmoorjmalani

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Aug 03 '23 21:08 ghost

I have the same problem doing a simple search

2023-09-18 23:20:27.003 Error: 500, {"error":{"code":"InternalServerError","message":"The call failed, please try again.","target":"","details":[{"code":"InternalServerError","message":"The call failed, please try again.","target":"","details":[{"code":"FanoutExternalTimeoutException","message":"The call failed, please try again.","target":"","details":[{"code":"TwoStepFanout_FirstStepFailed","message":"The call failed, please try again.","target":"","serviceName":"Xap","moduleName":"SubstrateSearch.FanoutV2.MultiDimensionSearchFanoutPluginV2","contactTeam":"3sdri","httpCode":500},{"code":"FanoutExternalTimeoutException","message":"The call failed, please try again.","target":"","serviceName":"FanoutService","moduleName":"Fanout","contactTeam":"ShardSearchDRI","httpCode":500}],"serviceName":"FanoutService","moduleName":"Fanout","contactTeam":"ShardSearchDRI","httpCode":500}],"moduleName":"SubstrateFanoutSearchWorkflow","httpCode":500}],"moduleName":"SearchAllTopLevelInternalWorkflow","httpCode":500},"Instrumentation":{"TraceId":"97e205b6-b55c-fdab-e7a8-e14b1de9eb87"}}

HozcarAndres avatar Sep 18 '23 23:09 HozcarAndres

Same here, any query, any entityTypes, using Application Permissions on v1.0 or beta endpoint, results in {"code":"InternalServerError","message":"The call failed, please try again.","target":""}

The app reg has Files.Read.All, Sites.Read.All as described here for Application Permissions: https://learn.microsoft.com/en-us/graph/api/search-query?view=graph-rest-1.0&tabs=http

Also including the Region as described here: https://learn.microsoft.com/en-us/graph/search-concept-searchall

Sean-LM avatar Oct 16 '23 14:10 Sean-LM

I was having the same issue in a PowerShell script. Until I noticed I was passing in region as an array (region = @("US")).

After changing it to a string literal (region = "US") I started getting 200s consistently.

PS: dmoorjmalani, I also think EMEA is not a valid region. It has to be either US or GBR.

Hope this helps.

Sean-LM HozcarAndres

eduardomb08 avatar Oct 19 '23 22:10 eduardomb08

Thank you for taking the time to file an issue. We periodically archive older or inactive issues as part of our issue management process, which automatically closes them once they are archived.

If you’d like to understand more about why and how we handle archived (closed) issues, please see Our approach to closed issues.

We appreciate your contribution and if this is still an active issue with the latest SPFx versions, please do resubmit the details. We needed to perform a cleanup, so that we can start with a clean table with a new process. We apologize for the inconvenience this might cause.

github-actions[bot] avatar May 03 '25 16:05 github-actions[bot]