I'm having trouble with getting user's manager data in SharePoint Javascript Model.

I'm using context.get_web().get_siteUserInfoList(); through SiteUserInfoList. What I got back is a bunch of info about a user (Title, JobTitle, Department, Office etc...) except who's that user manager.

What I'm missing? Or how can i get user's manager?

3 Answers 3


This blogpost describes how to get the current users manager by using the SPservices library.

The SPServices libary can be found on codeplex.

  • Note, this would require having SharePoint Server with a User Profile Service Application. May 10, 2013 at 13:18
  • Thanks, I gave it a shot but ultimately got it working through SP.UserProfiles.UserProfilePropertiesForUser
    – sebz
    May 13, 2013 at 13:12

Hi i know this is an old question, but here's a result that doesn't use SPServices:

Note that this answer is inspired from this post

The method to get the manager of a user by user_email:

function getManagerOfUser(user_email, onComplete) {
    SP.SOD.executeOrDelayUntilScriptLoaded(function () {
    // Create the client context and get the PeopleManager instance.
    var clientContext = SP.ClientContext.get_current();
    var peopleManager = new SP.UserProfiles.PeopleManager(clientContext);

    // Get user profile properties for the target user.
    // Specify the properties to retrieve and create the UserProfilePropertiesForUser object.
    // Then get the requested properties by using the getUserProfilePropertiesFor method.
    var profilePropertyNames = ["Manager"];

    var userProfilePropertiesForUser = new SP.UserProfiles.UserProfilePropertiesForUser(clientContext,
        "i:0#.f|membership|" + user_email,

    var userProfileProps = peopleManager.getUserProfilePropertiesFor(userProfilePropertiesForUser);

    clientContext.executeQueryAsync(function () {
        if (userProfileProps[0]) {
            var user = clientContext.get_web().ensureUser(userProfileProps[0]);
            clientContext.executeQueryAsync(function () {
            }, function (sender, args) {
        } else {
    }, function (sender, args) {
   }, 'SP.UserProfiles.js');

To use the code:

getManagerOfUser("[email protected]", function (result) {

Note that the result is of type SP.User


You can use REST API to get it easily:

_spPageContextInfo.webAbsoluteUrl + "/_api/SP.UserProfiles.PeopleManager/GetMyProperties"

For more information, read Get Current Logged in User & Manager using REST API in SharePoint

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.