Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

Update:

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
add comment

2 Answers 2

up vote 4 down vote accepted

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

Source

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
add comment

I have the same task and tried to implement it by referencing user profiles .asmx web service. So I call ModifyUserPropertyByAccountName method, but always receive "Operation Failure ---> Attempted to perform an unauthorized operation." if I try to update someone's (not mine) account. The query is executed by user, which is a member of clobal Administraotr. Tried to update another user profile via UI and was successful.

Any ideas on how to work it out?

Thanks.

share|improve this answer
    
Hi, I added one more update for my question about asmx service and authentication for SharePoint online, check it out. –  Anton Khritonenkov Jun 8 '13 at 9:10
add comment

Your Answer

 
discard

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.