I am targeting a Person/Group field within my page layout via JavaScript. This enables me to get the display name for that particular user "Lastname, Firstname".

Using '.innerHTML', I can also retrieve the email address for that user. I am wondering if I can use the "Lastname, Firstname" to lookup that particular user's account name for use elsewhere.

I have already found examples of where I can lookup various user profile properties given that my input is the account name. However I don't have this available to me and this is the property I need to retrieve.

1 Answer 1


Use SPServices for this. You can pass the lastname / first name and get the user object using which you can fetch user properties. See: http://spservices.codeplex.com/wikipage?title=SearchPrincipals

  • Thanks, I ended up using the code in the link you provided (SP Services - Search Principals). Worked with some change.
    – user20414
    Jul 28, 2015 at 15:30

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.