Hi @SrinivasaRaoDarnaMSFT-7657
Thank you for your answer about the usage of $filter, we can remove it and do filter to the response manually.
How about the difference that related with search in shared folder, it not always works?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
What we want is get a list of files with specified extension in a given folder or its sub folders.
And the search API is used in pattern
https://graph.microsoft.com/v1.0/me/$drive$/items/$itemid$/search(q='$ext$')?$filter=endsWith(name, '$ext$')
Where
$drive$ can be drive (for ones own) or drives/%driveId% (for shared item)
$itemid$ is the drive item id of the given folder
$ext$ is file extension such as xlsx
But for different account (personal, business) / share folder we get kinds of different unexpected results as following:
So we want to know is any limitation about the usage, or another way / API can help to ensure we get the expected result.
Thanks in advance,
Henry
Hi @SrinivasaRaoDarnaMSFT-7657
Thank you for your answer about the usage of $filter, we can remove it and do filter to the response manually.
How about the difference that related with search in shared folder, it not always works?
Hi @Henry Jia ,
As per documentation driveitem-search GET /me/drive/root/search(q='{search-term}')
supports only $expand
, $select
, $skipToken
, $top
, and $orderby
OData query parameters to customize the response.
Usage $filter
is not currently supported on this API.
Alternatively, consider use of POST /search/query
and Use filters in search queries.
Hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have any further questions about this answer, please click "Comment".