0

What is the best way to rename a file in SharePoint online without losing its version history? Is it enough to update the "FileLeafRef" or Should I do a file.move?

Is there a Graph way for it?

Ofer Gal
  • 707
  • 1
  • 10
  • 32

1 Answers1

1

We could use this to update file :

PATCH https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items/{item-id}/fields

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

Amos
  • 2,030
  • 1
  • 5
  • 9