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):
- create
newFileTest.docx
in the root of your GROUP folder - Search for the file:
https://graph.microsoft.com/v1.0/groups/{GROUP_ID}/drive/root/search(q='newFileTest.docx')
- returns 0 items - create
newFileTest.docx
in the root of your PERSONAL folder; - 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.