Take the 2-minute tour ×

I'm trying to rename a folder in a Sharepoint document store through a web application.

Changing the folder name works fine, but the name of the editor became the service user running the web application. I want to set the editor to the actual user who wanted to change it.

 //get the user, and the folder
 var user = clientContext.Web.EnsureUser(userLogin);
 //camlDirectorySelect is a CamlQuery to get the directory...
 var folders = spsList.GetItems(camlDirectorySelect);
 clientContext.Load(folders, x => x.Include(y => y["Title"], y => y["FileLeafRef"], y => y["Editor"], y => y["CheckoutUser"], y => y["Modified_x0020_By"]));

 if(folders.Count == 1) {
    var theFolder = folders[0];

    theFolder["Title"] = renameParams.NewDirName;
    theFolder["FileLeafRef"] = renameParams.NewDirName;

    theFolder["Author"] = user; //The 'Author' does change
    theFolder["Editor"] = user; //But 'Editor' will be the user executing the code (running the web app)...
    //tried this too, but no luck: theFolder["Editor"] = String.Format(@"{0};#{1}", user.Id, user.Title);

A similar method works perfectly for files, and I can change the 'Author' for folders too. Any ideas?

share|improve this question

1 Answer 1

From my experience, changing the Author or the Editor name isn't supported on client object model. So the next best thing is just to create your own custom web service\wcf service and update those fields on the server side. Here's a nice tutorial on how to create a custom wcf service.

Good luck,

Alex Choroshin.

share|improve this answer

Your Answer


