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
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.
- Query Connection using GetManagerDetails
- Set the AccountId of this getmanagerdetails to the manager’s ID
- 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 !!