Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Filtering Onedrive items by lastModifiedDatetime

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 ?

like image 773
Sébastien Pertus Avatar asked Feb 01 '26 18:02

Sébastien Pertus


1 Answers

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.

like image 190
Marek Rycharski Avatar answered Feb 04 '26 14:02

Marek Rycharski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!