Reputation: 35
I want to get a collection of ListItem
from a Sharepoint List (O365) using Microsoft Graph. I have used the following URI but it is returninga "Bad Request" error.
https://graph.microsoft.com/beta/sites/{id}/lists/{id}/items/{id}?expand=fields(select=Title,Product)
Upvotes: 2
Views: 1257
Reputation: 33094
First, you really shouldn't use the /beta
Graph in production code. It is not stable and breaking changes can (and do) happen without warning. Unless you have a very specific need, always use /v1.0
.
I believe your problem here is that you're attempting to select Title
from the Fields
collection. This property isn't actually a member of Fields
, it is part of the ListItem
itself. Try this instead:
?$select=title,fields&$expand=$fields($select=product)
Upvotes: 2