3

Is it possible to retrieve the name of a user using the SPServices given the email address?

Suppose Jack Harry has a email [email protected] inside the SharePoint 2007. Is it possible to provide SPService the email [email protected] and SPServices will return Jack Harry?

1 Answer 1

7

Try this:

$().SPServices({
    operation: "GetUserLoginFromEmail",
    emailXml: "<Users><User Email='[email protected]'/></Users>",
        completefunc: function (xData, Status) {
        $(xData.responseXML).find("User").each(function() {
                    $(this).attr("DisplayName");
                })
        }
});
3
  • +1 David, you are awesome! Nov 8, 2011 at 9:00
  • Excellent Answer Nov 8, 2011 at 10:26
  • Every time I try to pull the responseText from the result, it gives me null value for some reason. How do you get the display Name from all this. Cause it returns an object and during run time the responseText is absent
    – JohnC
    Nov 15, 2017 at 18:46

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.