The official Graph API documentation states that it is possible to:
search within a folder hierarchy
However, the entire drive is searched when we perform a folder scoped search like the following:
https://graph.microsoft.com/v1.0/me/drive/root:/Folder:/search(q='file')?select=name,webUrl,driveId
This has been discussed here [2] but either this has changed in the last year or did not work in the first place.
Is this a bug or intended behaviour? Can we scope the search to a single directory?
Reference
[1] https://learn.microsoft.com/en-us/graph/api/driveitem-search?view=graph-rest-1.0&tabs=http [2] How to search an item in specific folder in one drive?