Microsoft Graph API C# - How to update "CreatedBy" or "ModifiedBy" in Sharepoint?

Is it possible to update the CreatedBy (Author) or ModifiedBy (Editor) field for a document in Sharepoint using GraphAPI?

I am currently using a default service account to upload documents using GraphApi, but I need to update the "CreatedBy" field.

1 answer

  • answered 2021-05-04 04:15 Shiva Keshav Varma

    Here documents are nothing but the driveItems. If you check the driveItem resource type, you would see the properties where it is mentioned that CreatedBy and LastModifiedBy are read-only properties. So we cannot update the read-only properties.