How to filter SharePoint list-items by Id.
Id is out-of-the-box field in the SharePoint-list.
I am testing using graph-explorer: https://developer.microsoft.com/en-us/graph/graph-explorer
I tried with these filters
Working filter with Title:
https://graph.microsoft.com/v1.0/sites/root/lists/ba0dc64a-263c-44b6-8160-66a3034a1429/items?$expand=fields&$filter=fields/Title eq '1'
Non-working filter with Id:
https://graph.microsoft.com/v1.0/sites/root/lists/ba0dc64a-263c-44b6-8160-66a3034a1429/items?$expand=fields&$filter=fields/id eq '1'
{
"error": {
"code": "invalidRequest",
"message": "A provided field name is not recognized",
"innerError": {
"request-id": "9f0bd335-bf60-42dd-893e-397fe62bc890",
"date": "2019-05-01T00:25:51"
}
}
}
https://graph.microsoft.com/v1.0/sites/root/lists/ba0dc64a-263c-44b6-8160-66a3034a1429/items?$expand=fields&$filter=fields/Id eq 1
{
"error": {
"code": "BadRequest",
"message": "Invalid filter clause",
"innerError": {
"request-id": "730490af-6b08-4ac1-8259-fa9bb9dd9e46",
"date": "2019-05-01T00:26:28"
}
}
}