Graph REST API V1.0 - Restore a previous version of a ListItem - restoreVersion returns "Operation not allowed"

John Palmer 66 Reputation points
2021-08-31T22:52:39.17+00:00

According to this page (https://learn.microsoft.com/en-us/graph/api/listitemversion-restore), this should restore the version specified:

https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items/{item-id}/versions/{version-id}/restoreVersion

It appears that this operation was never implemented even though it appears in the documentation.

Another clue is in Graph Explorer, "restoreVersion" does not appear in intellisense where it should so it's not in the schema:

Here "versions" appears as an operation:
128064-image.png

And here where "restoreVersion" should appear, it does not.
128104-image.png

Bottom line: How do I programmatically restore a previous version?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,570 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,610 questions
0 comments No comments
{count} votes

Accepted answer
  1. MichaelHan-MSFT 18,016 Reputation points
    2021-09-01T06:08:30.873+00:00

    Hi @John Palmer ,

    Just did a test, this works for me on my end. I would get the error when using GET method.

    Please make sure you are using POST method instead of GET method.

    128145-image.png


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful