Reputation: 325
I'm trying to order a collection of list items with Microsoft Graph :
.../items?select=id&orderby=id%20desc
I've tried on multiple properties and with a space instead of %20
. I've followed the documentation.
But ids are always ordered ascending. Am I doing anything wrong or is it a bug with Microsoft Graph ?
Upvotes: 4
Views: 2923
Reputation: 33114
The $orderby
parameter is not currently supported by the SharePoint endpoints. At this time only $select
, $expand
, and $filter
are supported.
I recommend visiting the UserVoice and adding a request for this feature. It seems like it would be valuable when pulling a collection of ListItem
resources.
As an aside, you're also missing the $
prefix:
items?$select=id&$orderby=id desc
Ignoring the $
prefix is only supported on the beta
endpoint. Per the documentation:
Note: On the
beta
endpoint, the$
prefix is optional.
Upvotes: 7