Is this possible? We have an intranet hosted in Office 365 using SharePoint Online, however the performance is not that great. I wanted to migrate it to on-prem however for some of the functionality we use javascript, the search API, and Delve to get profile properties and pictures.
Whenever I bring the script on-prem and try to perform a staff search I get a 403 error when our on-prem domain tries to perform a search API GET against SharePoint Online using the below URL:
GET https://my-company.sharepoint.com/_api/search/query(querytext='bruce',%20rowlimit='500',%20trimduplicates=true,%20sourceid='b09a7990-05ea-4af9-81ef-edfab16c4e31',%20selectproperties='AccountName,PreferredName,JobTitle,Department') 403 () The ajax query params are really simple:
$.ajax({ url: "https://my-company.sharepoint.com/_api/search/query(" + str + ")", type: 'GET', headers: { 'accept': 'application/json;odata=verbose' } Is there any way to make this work?