How to get the department head from the User Profile

In AD, there is one attribute that contain a value of Head of department in that attribute

How to fetch this department head field programmatically ?

April 29th, 2015 4:16pm

Hi,

you can use REST API Url "http://siteurl/_api/SP.UserProfiles.PeopleManager/GetMyProperties"

and 

http://siteurl/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='domain\username'

If you have Head of the Department attribute in your AD and it has been mapped with User Profile Service,you can able to see this attribute with value.

You have to extract this values in JavaScript and show it on app or page.


Free Windows Admin Tool Kit Click here and download it now
April 30th, 2015 12:56am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics