Forum Discussion
JohnG_CData
Oct 23, 2024Copper Contributor
Drives search endpoint suddenly stopped working
We are facing an issue where the following endpoint has suddenly stopped working (as of 2024-10-23) for only one of our accounts:
https://graph.microsoft.com/v1.0/me/drive/root/search(q='.xls')
I am able to see the Excel workbooks I'm searching for /drive/root/children endpoint, but the /search is returning no results in one of the two accounts. I know indexing can be an issue that causes a delay for results to show up from /search, but many of the files on the affected account have been there for 6 months.
Comparing the working account to the failing one, I don't see any significant difference in the requests. For both accounts, the OAuth scopes requested are the same (from the decoded Bearer token):
"scp": "AllSites.Read Files.Read Files.Read.All Files.Read.Selected Files.ReadWrite Files.ReadWrite.All Files.ReadWrite.AppFolder Files.ReadWrite.Selected Sites.Read.All Sites.ReadWrite.All profile openid email"
Both accounts are Business OneDrive accounts. I can even access the workbooks directly on the failing account from the following endpoint:
So it seems that /search is simply not working. Our tool is reliant on the /search endpoint, so it would not be a quick fix to change this and it is affecting some of our customers as well.
Is this a known issue or does anyone have another clue on what to check? I'm wondering if search indexing is broken on this account (and our customer's account), but I don't know of any way to force it to re-index the files.
We ended up changing our tool to support the /children/ endpoint instead, even though it's theoretically less performant for what we're trying to do. The /search endpoint is still not working for one of the users on our testing tenant. We found another user on that tenant that's configured identically and /search is working fine there. I'm convinced this is broken on MS's side, but I don't know how to get more visibility on this.
4 Replies
Sort By
- rishabhbajpaiCopper Contributor
Hey, I faced the same problem yesterday and turns out this searching everything on my one drive solution worked for me too. Though it’s very weird. Why is this thing programmed the way it is ?
- JohnG_CDataCopper Contributor
We ended up changing our tool to support the /children/ endpoint instead, even though it's theoretically less performant for what we're trying to do. The /search endpoint is still not working for one of the users on our testing tenant. We found another user on that tenant that's configured identically and /search is working fine there. I'm convinced this is broken on MS's side, but I don't know how to get more visibility on this.
- Troy_BigelowBrass Contributor
Hey John,
We brought on another beta tester where the MS Graph Drive search wasn't returning any results. Had him try the Search Everything on onedrive.live.com. Then had him go back and try MS Graph Drive search, magically started working! I think there is some kind of initialization that happens on a user account when using browser search, but not for the Graph search. If stumble on how to resolve that with MS Graph, I'll post here, but the browser search is a quick workaround.
Cheers!
Troy
- Troy_BigelowBrass Contributor
Hey John,
I was seeing this same behavior with one of our internal testers. All of our other testers could search and get expected results. However, his search would always return 0 records. I had him login to OneDrive from his browser and try the Search everything (onedrive.live.com) which returned expected files. Unexpectedly, after searching in the browser, our MS Graph Drive search started working for him! Not sure if that is what resolved his search problem, but it certainly is quite a coincidence. We'll see how it plays out when we bring on some beta testers, if we come across another one, I'll try the browser Search everything, if it works, I'll come back with an update.
Cheers!
Troy