Drive Search not working in Office 365 group

半城伤御伤魂 提交于 2019-12-25 00:51:57

问题


DriveItem Search does not seem to be possible in an Office 365 group context, despite the documentation mentioning it should be supported: GET /groups/{group-id}/drive/root/search(q='{search-text}')

Steps to reproduce (e.g. in the Graph Explorer):

  1. create newFileTest.docx in the root of your GROUP folder
  2. Search for the file: https://graph.microsoft.com/v1.0/groups/{GROUP_ID}/drive/root/search(q='newFileTest.docx') - returns 0 items
  3. create newFileTest.docx in the root of your PERSONAL folder;
  4. Search for the file: https://graph.microsoft.com/v1.0/me/drive/items/root/search(q='newFileTest.docx') - returns 1 item

Happy to provide more info if needed.


回答1:


I've tried the following (with my O365 group):

https://graph.microsoft.com/v1.0/groups/cfb5e170-36b0-4156-b17b-4b6bc2ddd777/drive/items/root/search(q='t.xlsx')

and it's returning one (as it should).




回答2:


this is most probably due to insufficient permission. You may not have Read Write Permission for Groups.

You can try this .




回答3:


Thanks for taking the time to reply everyone! Turns out the problem is with one of my sites that I'm trying to perform a search in. Searching in the SharePoint UI also doesn't work on this site, and it's not visible in the list of Team Sites in OneDrive. A different Team Site is visible in this list, and searching in that Site works in both the SharePoint UI and Graph API. Will open a support ticket with Microsoft about this. Thanks again!

The affected Team Site:

The working Team Site:



来源:https://stackoverflow.com/questions/55727839/drive-search-not-working-in-office-365-group

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!