I'm trying to retrieve user people with rest api. But it does not work.
var getSpecificUserProperty = "/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='i@v='"+encodeURIComponent('i:0#.f|membership|firstname.aftername@domainaftername@sitename.se'sharepoint.com')+"'";
$.ajax({
url: siteUrl + getSpecificUserProperty,
type: "GET",
headers: { "accept": "application/json;odata=verbose" },
success: function(data, status){
console.log(data.d.results);
},
error: function(err){
console.log(err);
}
});
Why doesn't this code work? What am i doing wrong?