I'm currently working with the SharePoint Framework Extensions that are currently in developer preview – specifically Application Customizers. How can I lookup user profile properties for the current user?

  • What properties do you want ? Can you tell us ? – Gautam Sheth Aug 2 '17 at 17:49

You can use PnP JS to get the entire user profile properties as shown below :

pnp.sp.profiles.myProperties.get().then(function(result) {
var userProperties = result.UserProfileProperties;
var userPropertyValues = "";
userProperties.forEach(function(property) {
userPropertyValues += property.Key + " - " + property.Value + "<br/>";
document.getElementById("spUserProfileProperties").innerHTML = userPropertyValues;
}).catch(function(error) {
 console.log("Error: " + error);

get User Profile properties using SPFx and PnP JS

enter image description here

  • this can be used in webpart, but not in application customizer – user27178 Mar 8 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.