Is it possible to update multiple user profiles and their properties using CSOM.

I have checked the code for SetSingleValueproperty() method, but can't use it for updating multiple properties for different users.


Use Microsoft.SharePoint.Client.UserProfiles.PeopleManager.SetMultiValuedProfileProperty method to set multi-value user profile property, for example:

using (var ctx = GetSPOContext(webUri,userName,password))
     PeopleManager peopleManager = new PeopleManager(ctx);
     var skills = new List<string>() { "SharePoint", "Office 365", "C#", "JavaScript" };
     peopleManager.SetMultiValuedProfileProperty(accountName, "SPS-Skills", skills);


var properties = new Dictionary<string,string>();
properties["AboutMe"] = "SharePoint User";
properties["WorkPhone"] = "123-456-7890";

foreach (var p in properties)
     peopleManager.SetSingleValueProfileProperty(accountName, p.Key, p.Value);
| improve this answer | |
  • This method is for setting multi valued property. What i need is setting multiple properties like ABout Me, WorkPhone,e.t.c . can i loop SetSingleValueproperty() method?? – user39890 Feb 24 '15 at 4:58
  • The answer has been updated – Vadim Gremyachev Feb 24 '15 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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