Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: GetUserInfo Using PreferredName

$
0
0
Hello, I'd like to use GetUserInfo to retrieve the WorkEmail of a user form Active Directory. The GetUserInfo function below looks up the user by the accountName. Is it possible to get the WorkEmail from AD using the PreferredName? The only information provided to my page is the user's name.
var $email;

$.SPServices({
    operation: "GetUserInfo",
    userLoginName: "SHARE1\\user",
    completefunc: function (xData, Status) {
        $(xData.responseXML).find("User").each(function() {
            $email = $(this).attr("Email");
            alert($email);
    }
});

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>