MS Graph Search API Error: Value cannot be null. (Parameter 'searchHistoryManager')
I'm encountering an error with the Microsoft Graph API /search/query endpoint. The error message is as follows:
"message": "Value cannot be null. (Parameter 'searchHistoryManager')"
It was working fine at least until yesterday. I'm using application permissions.
I found the following question when searching. The situation is the same, but since I'm already using the POST method, it doesn't seem helpful for me.
[https://learn.microsoft.com/en-us/answers/questions/2224263/ms-graph-search-api-error-value-cannot-be-null-(pa](https://learn.microsoft.com/en-us/answers/questions/2224263/ms-graph-search-api-error-value-cannot-be-null-(pa)
Here's the curl command I'm using:
❯ curl -X POST "https://graph.microsoft.com/v1.0/search/query" \
-H "Authorization: Bearer [redacted]" \
-H "Content-Type: application/json" \
-d '{
"requests": [
{
"entityTypes": [
"site"
],
"query": {
"queryString": "contoso"
},
"region": "JPN"
}
]
}'
And here's the response I'm getting:
{
"error": {
"code": "System.ArgumentNullException",
"message": "Value cannot be null. (Parameter 'searchHistoryManager')",
"target": "Microsoft.Griffin.WebService.Search.SearchHistoryWriters.BaseSearchHistoryWriter`3[TRequest,TSettings,TResponse].Validate"
},
"Instrumentation": {
"TraceId": "0a69102a-af8f-0d80-bf01-2ad476606011"
}
}
Has anyone else encountered this issue or knows how to resolve it?