Quantcast
Viewing all articles
Browse latest Browse all 6517

Commented Unassigned: SharePoint 2013 - couldn't get user's department field [10161]

I couldn't retrieve the user's information in SharePoint 2013,
$().SPServices({
operation: "GetUserProfileByName",
async: false,
AccountName: "domain//usrname",
completefunc: function (xData, Status) {
firstName = getUPValue(xData.responseXML, "Department");
//office = getUPValue(xData.responseXML, "Office");
}
});
return firstName;
}



function getUPValue(x, p) {
var thisValue = $(x).SPFilterNode("PropertyData").filter(function () {
return $(this).find("Name").text() == p;
}).find("Values").text();
return thisValue;
}

throwing error like
SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.
Comments: That looks to be an authentication error, nothing with SPServices. M.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



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