MS Graph Search API Error: Value cannot be null. (Parameter 'searchHistoryManager')

mac fel 10 Reputation points
2025-03-18T09:14:20.3166667+00:00

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?

Microsoft Security | Microsoft Graph
{count} votes

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.