How to get Manager’s Manager Name in SharePoint 2010 using Infopath?

Hi Friends,

A lot of you might have heard it about userprofileservice.asmx which is used to fetch user profile details of the given user. The web url for the UserProfile.asmx is http://yoursite/_vti_bin/userprofileservice.asmx. By default, if you don’t set account id property , it give you the details of current logged in user. Basically User profile service fetch user details information such as


  • UserProfile_GUID
  • FirstName
  • LastName
  • PreferredName
  • WorkPhone
  • AccountName
  • Department
  • Title
  • Manager
  • AboutMe
  • Office
  • PersonalSpace
  • PictureURL
  • UserName
  • QuickLinks
  • WebSite
  • PublicSiteRedirect
  • SPS-Dotted-line
  • SPS-Peers
  • SPS-Responsibility
  • SPS-Skills
  • SPS-PastProjects
  • SPS-Interests
  • SPS-School
  • SPS-SipAddress
  • SPS-Birthday
  • SPS-MySiteUpgrade
  • SPS-DontSuggestList
  • SPS-ProxyAddresses
  • SPS-HireDate
  • SPS-LastColleagueAdded
  • SPS-OWAUrl
  • SPS-ResourceAccountName
  • SPS-MasterAccountName
  • Assistant
  • WorkEmail
  • CellPhone
  • Fax
  • HomePhone

To get the Manger’s details, You can access value of the property Value[Name = “Manager”].But it gives you the account ID,not the full preferred name. To make that to happen, You need to create a secondary data connection “GetManagerDetails” before calling the connection, Create a rule as follows.

  1. Query Connection using GetManagerDetails
  2. Set the AccountId of this getmanagerdetails to the manager’s ID
  3. Now query manager profile details using Value[Name = “PreferredName”] – This preferred name will give you the manager name.

Similarly, you can access up to manager’s manager and go on,[Manager1,Manager2…ManagerN].. The key point here is assigning the accountID.

Hope it helps someone!! Please spread it to your friends!! Happy SharePointing !!

Leave a Reply

Your email address will not be published. Required fields are marked *