Skip to content

Instantly share code, notes, and snippets.

@IAMIronmanSam
Created May 10, 2016 07:56
Show Gist options
  • Select an option

  • Save IAMIronmanSam/23b4e88acbdb1a6d87b35c79c8a6bdf2 to your computer and use it in GitHub Desktop.

Select an option

Save IAMIronmanSam/23b4e88acbdb1a6d87b35c79c8a6bdf2 to your computer and use it in GitHub Desktop.
Get complete user profile data by user email
function getUserInfo(alias){
$.ajax({
url: "/sites/_api/sp.userprofiles.peoplemanager/GetPropertiesFor(@v)?@v='"+encodeURIComponent('i:0#.f|membership|'+alias)+"'",
type: "GET",
headers: { "Accept": "application/json;odata=verbose" },
success: function(data) {
var dataResults = data.d;
debugger;
},
error: function (err) {
console.error(JSON.parse(err.responseText).error.message.value);
}
});
}
getUserInfo('arivu@xyz.com');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment