SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.25k stars 1.01k forks source link

SPHome API Alternatives #8538

Open StationToStation opened 2 years ago

StationToStation commented 2 years ago

What type of issue is this?

Question

What SharePoint development model, framework, SDK or API is this about?

SharePoint REST API

Target SharePoint environment

SharePoint Online

What browser(s) / client(s) have you tested

Additional environment details

Issue description

Following the removal of SPHome APIs from SharePoint Online, we are seeking alternatives to fit with behaviour in our SPFx web part.

I would like to replicate the SharePoint search box behaviour in a custom web part, particularly displaying the instant/suggested search results (when the search box displays suggested sites, files, and people when the user has not typed anything in the search box yet). MicrosoftTeams-image (1)

The endpoint we currently use gets activities from the feed, as posted here: https://medium.com/maxali/sharepoint-home-service-apis-4b7474f2defd, but it gets a token from SharePoint SPHome Service API, which is due to be closed in November.

Some alternative APIs that I have discovered are:

Documents used by a user - https://learn.microsoft.com/en-us/graph/api/insights-list-used?view=graph-rest-1.0&tabs=http Trending documents - https://learn.microsoft.com/en-us/graph/api/insights-list-trending?view=graph-rest-1.0

But these APIs only partially replicate instant search results from the out-of-the-box SharePoint search experience we are after. We would love for some support on the best way to get these zero-term suggestions

ghost commented 2 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.