microsoftgraph / microsoftgraph/msgraph-sdk-python
Filter clause not working anymore in ItemsRequestBuilderGetQueryParameters
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 630
- Forks
- 96
- Avg merge
- 15h 20m
- Merged PRs (30d)
- 3
Description
Describe the bug
I have a query that's using this code to retrieve a folder by name:
onedrive = await client.me.drive.get()
query_params = ItemsRequestBuilder.ItemsRequestBuilderGetQueryParameters(
filter="name eq 'some_name'"
)
config = RequestConfiguration(query_parameters=query_params)
subfolder = (await client.drives.by_drive_id(onedrive.id).items.get(request_configuration=config)).value
but suddenly it's not working anymore.
The filter based on the name just returns all 200 subfolders of onedrive.
Expected behavior
Just the folder with "some_name" is retrieved
How to reproduce
onedrive = await client.me.drive.get()
query_params = ItemsRequestBuilder.ItemsRequestBuilderGetQueryParameters(
filter="name eq 'some_name'"
)
config = RequestConfiguration(query_parameters=query_params)
subfolder = (await client.drives.by_drive_id(onedrive.id).items.get(request_configuration=config)).value
SDK Version
1.15.0
Latest version known to work for scenario above?
No response
Known Workarounds
Maybe switching to ChildrenRequestBuilder and using items.by_drive_items_id(ID).children.get(query_params with name filter)
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
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 running the reported reproduction against SDK version 1.15.0, using ItemsRequestBuilder.ItemsRequestBuilderGetQueryParameters and RequestConfiguration. Compare the result with the suggested ChildrenRequestBuilder workaround and verify whether the filter is sent and applied. Done means the request returns only the folder named "some_name".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100