SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.