SharePoint 2013 - User Profile Properties through JSOM


You may also be interested in: fpweb.net


 

Editor’s note: Contributor Tahir Naveed is a Microsoft SharePoint Specialist in the New York City region

Within an organization, users are created in an Active Directory and then imported to SharePoint through the User Profile Service. This service creates User Profiles in SharePoint which have properties like name, email, phone number, manager etc as well as some custom properties.

The following script will access four User Profile properties (Title, Department, Office location and Phone) through the JavaScript Object Model:



Example:

1. Create a blank ASPX page.

2. Add a Content Editor Web Part to the page.

3. Copy the above JavaScript on the page to get the following output

2013-10-16-UserProfileJSOM-01.png

Ref1: http://technet.microsoft.com/en-us/library/ee721054.aspx
Ref2: http://technet.microsoft.com/en-us/library/hh147510.aspx

For everything SharePoint and Office 365 from the community for the community!