0

I am trying to update user profile property using CSOM for SharePoint onpremise, but the value was not updated to the property. There is no error exception. I try with JSOM but it does not work also. Have anyone meet this issue like me?

string accountName = "domain\\userloginname";
ClientContext clientContext = new ClientContext(url);
NetworkCredential ncr = new NetworkCredential(accountName, securePassword);
clientContext.Credentials = ncr;

var peopleManager = new PeopleManager(clientContext);
peopleManager.SetSingleValueProfileProperty(accountName, "AboutMe", "Value by CSOM");
clientContext.ExecuteQuery();
  • which version of SharePoint OnPrem are you using ? – Gautam Sheth May 10 at 5:25
  • @GautamSheth It is SharePoint 2019, thanks. – Jack May 10 at 5:55

Your Answer

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

Browse other questions tagged or ask your own question.