Reputation: 471
My objective is to retrieve the list of files that are changed after a specific date/time using "lastmodifieddatetime" filter in delta queries of Graph API.
This delta query runs fine without the filter and return the results https://graph.microsoft.com/v1.0/drives/b!tdu7QGu1NUiJuvpapUo4eHtDQtia22xMmeJKVjKjCUHKKpRlf9SfT6j9xNTidHfN/root/delta?$filter=lastModifiedDateTime ge '2021-07-30T14:41:08Z'
However, this fails to execute with an error with a filter clause:-
Please let me know if there is any solution available to filter out the files changed after the specific date and time. Any workaround will help too. Thank you.
Upvotes: 2
Views: 1148
Reputation: 718
Thank you for your question. Filter isn't currently supported on the endpoints to track changes to a drive which is why the request fails. From the documentation on tracking changes:
This method supports the $select, $expand, and $top OData query parameters to customize the response.
I would suggest handling the filtering in your logic as a workaround. Would you consider filing a feature request on the M365 Developer Platform so that this can be looked into?
Let me know whether this helps and if you have further questions.
Upvotes: 1