Wednesday 28 January 2015

Set user profile properties using JSOM & JavaScript

User Profile properties were recently made writable from the CSOM. Vesa Juvonen has a great post about it here . In addition to that, I have also blogged about how a Tenant admin can set the user profile properties of the users in the tenant.

In this post, I will show you how to set the current user's profile properties using the JavaScript Client Object Model (JSOM). Please refer to the 2 posts I have mentioned for any additional details around this.

Right now this functionality is only available in SharePoint Online/Office 365. If you want this functionality to come to SharePoint 2013 On-Premises, please create or up-vote on the feedback here: https://officespdev.uservoice.com/

8 comments:

  1. Thank you.. was helpfull :)

    ReplyDelete
  2. I am trying to reorder user profile properties in office 365 like moving property from one section to another section but unfortunately i have to do the same using move up and down button which is troublesome because after 2 - 3 attempts all moved properties come back to original position, please let me know if there is any mechanism other than move up and down button to change section of properties.

    ReplyDelete
  3. Hi Sarang, Unfortunately I think the only way to reorder the properties in SPO is to do it manually.

    ReplyDelete
  4. Thanks for the post. Good article.

    Is there a way to update user profile properties through JavaScript in SharePoint 2013 On-Premises

    Appreciate your help!

    ReplyDelete
  5. s there a way to update user profile properties through JavaScript/RestAPI or CSOM in SharePoint 2013 On-Premises

    ReplyDelete
  6. Hi Sujit,

    For SharePoint 2013, you can either use the UserProfileService.asmx or SPServices from JavaScript.

    ReplyDelete
  7. Hi Vardhaman,

    I have updated the user information from scheduler & scheduler is on another server. We have migrated ADFS user in share point so network credential is not work in UserProfileService.asmx.

    ReplyDelete

Comments moderation is turned ON. Your comment might not appear immediately after posting.