问题
I try to filter OneDrive items from within the Microsoft Graph endpoint, by lastModifiedDatetime property.
Something like that :
https://graph.microsoft.com/beta/me/drive/special/photos/children?$top=3&$orderBy=lastModifiedDatetime
It doesn't work. The error returned is :
"message": "The request is not supported by the system."
But according to the documentation ( https://dev.onedrive.com/odata/optional-query-parameters.htm#optional-odata-query-parameters )
oderby : Comma-separated list of properties that are used to sort the order of items in the response collection. Works for name, size, and lastModifiedDateTime fields.
By the way, I tried to sort with the name property and it actually works as expected :
https://graph.microsoft.com/beta/me/drive/special/photos/children?$top=3&$orderBy=lastModifiedDatetime
Can you confirm than sorting by lastModifiedDateTime is not permitted with the graph api endpoint ?
回答1:
Filtering by lastModifiedDateTime is not supported for OneDrive for Business. It is supported for OneDrive Personal. The limitation is not specific to the Microsoft Graph endpoint. There is a note about it in the referenced documentation page.
来源:https://stackoverflow.com/questions/39493030/filtering-onedrive-items-by-lastmodifieddatetime