Error thrown when using Sharepoint API for search: "The SafeQueryPropertiesTemplateUrl '{0}' is not a valid URL."

Harsha Vardhini 25 Reputation points
2024-01-14T15:25:35.4366667+00:00

When attempting to perform a site search or content search in Sharepoint using the POST API "https://{tenant}//_api/search/postquery", I get the following error: "The SafeQueryPropertiesTemplateUrl '{0}' is not a valid URL." However, I did not include the field "SafeQueryPropertiesTemplateUrl" in my request body, and the user is authenticated and has the access token. My request type in metadata is "Microsoft.Office.Server.Search.REST.SearchRequest". Even when I attempt to add the field, it says the property is incorrect and does not fit the type. I cannot determine from the documentation why this error is being thrown when the field is not included in the request. Can someone help me with this issue?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,793 questions
{count} vote