davidvera
davidvera

Reputation: 1499

Multicriteria Query and filter on drive items with Graph

I try to build the correct URL to query a lis item on Sharepoint using Graph API. If I have 1 field I query on I build this URL and the get request returns me the expected result.

https://graph.microsoft.com/v1.0/sites/root:/sites/{siteId}:/lists/{listId}/items?expand=fields/FIELD1&filter=fields/FIELD1 eq '123456789'

My Issue is that I want to query on multiple fields on a list : For example i want all document with values on FIELD1 and FIELD2 equals to 123456789 and 'John'

https://graph.microsoft.com/v1.0/sites/root:/sites/{siteId}:/lists/{listId}/items?expand=fields/FIELD1&expand=fields/FIELD2&filter=fields/FIELD1 eq '123456789'&filter=fields/FIELD2 eq 'John'

I do have a response while I should not. I do have a document with FIELD1's value equal to 123456789 but FIELD2's value is equal to 'Wayne' ...

Upvotes: 0

Views: 636

Answers (1)

davidvera
davidvera

Reputation: 1499

I finally solved how to build the URL ...

https://graph.microsoft.com/v1.0/sites/root:/sites/{siteId}:/lists/{listId}/items?filter=fields/FIELD1 eq '123456789' and fields/FIELD2 eq 'John'

Upvotes: 0

Related Questions