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 need to modify user profile properties using JavaScript (REST or CSOM). How can I do that?

I don't see any methods in MSDN documentation about modifying profile properties without server code.

Thank you


I found that old .asmx user profile service works well, but in SharePoint Online I cannot grant permissions for my account to change all users properties, so I can edit using .asmx only my editable properties. It is possible to grant permissions for account in on-premise SharePoint and edit all users properties from app, but this is not my case.

Update: If you are interesting in solution I recommend above there is stackexchange discussion about calling .asmx service with SharePoint Online

share|improve this question
up vote 8 down vote accepted

Update as on 07/01/2014

User profile properties are now writable via CSOM.

Thanks to Vardhaman Deshpande.

Original Answer

I am afraid if you can change User profile properties as stated by MSDN,

User profile properties from client APIs are read-only (except the profile picture, which you can change by using the PeopleManager.setMyProfilePicture method). If you want to change other user profile properties, you must use the server object model. For more information about working with user profiles


If you want to change them through Server side code check this out,

Work with user profiles in SharePoint 2013

share|improve this answer
Thank you. I know about server API, but I work with SharePoint Online, so it is not my case. I'll be looking for alternatives. – Anton Khritonenkov Mar 28 '13 at 17:14
User profile properties are now writable via CSOM… – Vardhaman Deshpande Jan 6 '15 at 14:32
<script src="../_layouts/15/JS/Slider/jquery.min.js"></script>

var personProperties;
$(document).ready(function () {
        try {
// SP.UserProfiles.js script file loaded
SP.SOD.executeOrDelayUntilScriptLoaded(getUserProperties, 'SP.UserProfiles.js');
  } catch (e) {
            alert("Ready Error:" + e);


function getUserProperties() {

var targetUser = "raghupc\\raghu";

var clientContext = new SP.ClientContext.get_current();
var peopleManager = new SP.UserProfiles.PeopleManager(clientContext);

personProperties = peopleManager.getPropertiesFor(targetUser);

clientContext.executeQueryAsync(onRequestSuccess, onRequestFail);

//Sucess function
function onRequestSuccess() {

var messageText = " \"DisplayName\" property is "    + personProperties.get_displayName();

messageText += "Department"  + personProperties.get_userProfileProperties()['Department'];
$get("results").innerHTML = messageText;

//Fail function
function onRequestFail(sender, args) {
    $get("results").innerHTML = "Error: " + args.get_message();

Click Here .You will see more details

share|improve this answer
Please don't add the exact same answer to this question, as you did on this one. Instead, try to specify your answer further to make it a better of this specific question. Thank You! – Benny Skogberg Oct 14 '15 at 7:12

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.