question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Supporting search in SharePoint and OneDrive for Business deployments

See original GitHub issue

Problem description:

The search we use leverage OneDrive Graph API, which, to our surprise, returns inconsistent results across different versions of OneDrive. The path field returned in parentReference, which we use to determine the route of the search result, is missing in sites including SharePoint versions of OneDrive. (And I suspect OneDrive for Education also would fail.)

Response in OneDrive international:

{
  // ...
  "parentReference": {
    "driveId": "ba63e0ea99dd98a3",
    "driveType": "personal",
    "id": "BA63E0EA99DD98A3!101",
    "path": "/drive/root:/Public/...images"
  }
}

Response in OneDrive for Business (or SharePoint):

{
  // ...
  "parentReference": {
   "driveId": "b!HHKxEe-tCUSO3uwES5r92kUCpw2Kc7ZOsvIWTv_MiTfm6fDv2B0pQrMbNCud5_8Q"
    "driveType": "business"
    "id": "01EYSPL6RHQBXPXWRLUVFYF5VWBO2QFEYF"
  }
}

Tasks

  • Display a short error message for SharePoint users for now.
  • Find a valid API return that could be used to determine the route of search results.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
spencerwooocommented, Jan 23, 2022

Still waiting for my own SharePoint to finish building its search index 😮‍💨.

I currently have nothing returned in my search results no matter what I search for. (As of 16:33 UTC+8, Jan.23, 2022)

Edit: I don’t know if anyone is experiencing the same thing but:

0reactions
spencerwooocommented, Jan 24, 2022

oh my god it’s working now…?? why!!?

Screenshot 2022-01-24 at 15 39 35

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set up Search of Microsoft OneDrive from SharePoint Server
Provide an easy way for users of on-premises SharePoint Server to search for documents that are in OneDrive.
Read more >
Plan for SharePoint and OneDrive in Microsoft 365
FastTrack provides you with a set of best practices, tools, resources, and experts committed to helping you deploy Microsoft 365. Guidance ...
Read more >
Configure enterprise search in SharePoint Server
The Search service application crawls content and provides search results. You can either create it as part of a new deployment of SharePoint...
Read more >
Manage the Search Center in SharePoint - Microsoft Learn
The Search Center is a site or site collection that has a starting page where users enter search queries and a search results...
Read more >
Searching private content in Microsoft 365 OneDrive for ...
This applies to all search experiences for SharePoint and OneDrive, including native OneDrive for Business web and mobile search experiences ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found