Aug 08 2022 03:04 PM
Hello,
When working with SharePoint 2019, executing a Search query from the SharePoint Home/Start Page (i.e., sharepoint.aspx) results in 401 unauthorized. This only occurs when setting a Global Search Center URL (which is part of the requirements).
See https://docs.microsoft.com/en-us/sharepoint/sites/enable-sharepoint-home-page-in-sharepoint-server-2... for background.
We have two hosts:
The former hosts the Global Search Center and the latter hosts the SharePoint Home Page (sharepoint.aspx). If you run a search query, the following request is sent (supposing I search for the value "test").
If I don't have a Global Search Center URL specified, then the search api query shown above will be sent to the MySites host and all is well. However, in this cross-domain scenario, where my.domain.com invokes the search api call on home.domain.com, it results in a 401 unauthorized response. My OPTIONS request (prior to the GET call) does pass with a 200 OK, so this doesn't appear to be CORS related on the surface; not dismissing any explanations though :)
Any advice on this? Have you successfully set this up and seen it work - mysites host calling the search api on a different host (due to having Global Search Center configured) through the SharePoint Home Page (sharepoint.aspx)?
Thanks!
Aug 09 2022 01:22 PM
SolutionAug 09 2022 01:22 PM
Solution