sympmarc / SPServices

SPServices is a jQuery library which abstracts SharePoint's Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely client side and requires no server install.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get user by any profile value?

mushieslushie opened this issue · comments

Is there a way to get the user profile by a field other than the username?

I'm working on an interactive style floor map, and it would be helpful if I were able to get the user by their Office profile value.

There are three different operations in the UserProfile service to get a User Profile:

  • GetUserProfileByGuid
  • GetUserProfileByIndex
  • GetUserProfileByName

You might want to use the userID value with GetUserProfileByIndex. Alternatively, call $().SPServices.SPGetCurrentUser to get the field(s) you need.

Finally, if you are in SharePoint 2013+, use a REST call instead.