Filtering Onedrive items by lastModifiedDatetime

核能气质少年 提交于 2020-03-02 09:22:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!