How to get previous version of file store in Onedrive

AryanG 21 Reputation points
2022-10-19T12:05:25.97+00:00

Hi,
I want to check the changes made to a file in onedrive by other users. My question is how to use graph apii to accomplish this.

Thanks in advance.

Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | OneDrive | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. HarmeetSingh7172 4,826 Reputation points
    2022-10-19T12:32:45.377+00:00

    Hello @AryanG

    Thanks for reaching out!

    1. You can use List driveItem Versions Graph API to retrieve the versions of file.
    2. To retrieve the contents of a specific driveItem version, please follow this documentation.

    Note: The above API doesn't support retrieving contents of current/latest version. However, you can follow this Graph documentation to retrieve contents of latest version.

    Versions are returned in descending order (newest to oldest). The OData $orderBy query string parameter is not supported.

    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

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.