How to get list of moved files in Onedrive using API

Dhruvin Moradiya 55 Reputation points
2023-03-10T09:49:03.68+00:00

Hi,

I'm using MS graph API to manage files in OneDrive. I want to list changes in Drive folders. I used Delta to get a list of changes.

https://learn.microsoft.com/en-us/graph/api/driveitem-delta?view=graph-rest-1.0&tabs=http

Delta works well in creating, updating, or deleting files. But it doesn't give us proper results for moved files.

Let's say I'm listing changes for /root:/folder1/folder2 , and I move one file from folder2 to the root or folder1; it doesn't provide anything to help determine that file has moved from folder2 to another location.

https://graph.microsoft.com/v1.0/me/drive/root:/folder1/folder2:/delta?token=2023-03-09T12:01:00Z

Is there any feature in MS Graph API that can list moved files from a particular folder?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,051 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Siddharth Gautam 855 Reputation points
    2023-03-10T15:17:06.4933333+00:00

    Hello Dhruvin Moradiya,

    Thanks for posting!

    I tried to replicate the same scenario from my end, and I am able to face the same issue. As per my analysis, Delta only works with root folder but not with sub-folders.

    Since this Feature/Functionality is presently not available, you can submit a feature request idea using this support link, which will be monitored by Microsoft team and make the enhancements to Microsoft Graph APIs. I will also upvote for you.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.

    0 comments No comments