microsoftgraph / microsoftgraph/msgraph-sdk-dotnet
Items GetAsync with Filter on Name, expect 1 result but get 0
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 789
- Forks
- 264
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 3
Description
I've found that using filter on a folder (in this case my root / Shared Documents in SharePoint) it doesn't return the folder
var folderSearch = await serviceClient!
.Drives[drive.Id]
.Items
.GetAsync(cfg => cfg.QueryParameters.Filter = "name eq 'myfolderthatexists'");
Since my folder has 200+ items in it, I used PageIterator (since I saw ONextDataLink being returned) and saw I had to page to the item before it returns?
The expectation of Filter (at least in my opinion) should return that driveitem only
I don't mind using PageIterator, as soon as I detect the Item I just return false to stop it. I'm just wondering why the filter returns empty pages until it's on the page it expects?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Drives[drive.Id].Items.GetAsync request with the name filter against a folder containing more than 200 items. Compare the filtered pages with the PageIterator behavior and determine whether the observed empty pages match the SDK or service response. Done means the filtering behavior is explained and the expected result or limitation is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100