2

I am using Web API to add file to sharepoint2016 and it works, but the column "modified by" is filled with "System account". I used credentials of other user to add the file, so I would like to see that user there. Is there any possibility how to tell Sharepoint to use that identity instead of the system account, which is probably the user running the web api service.

The project is in .net core so even other solutions other than web api would be helpful. Thanks

1 Answers1

0

Do you use that upload script with RunWithElevatedPrivileges ?

like this ?

SPSecurity.RunWithElevatedPrivileges(delegate()
{
    using (SPSite site = new SPSite(web.Site.ID))
    {

    }
});