I am using SharePoint online. I want to show basic details(with picture) of currently login user at Home page. Means every user will see his/her own details in their homepage.

Any suggestion.

1 Answer 1


You can add a Script Editor Web Part to the home Page and then use JavaScript/jQuery/REST API to get required information. Use HTML/CSS to present it in nice and friendly way.



    // Ensure that the SP.UserProfiles.js file is loaded before the custom code runs.
    SP.SOD.executeOrDelayUntilScriptLoaded(loadUserData, 'SP.UserProfiles.js'); 

  var userProfileProperties;

  function loadUserData(){

    //Get Current Context   
    var clientContext = new SP.ClientContext.get_current();

    //Get Instance of People Manager Class
    var peopleManager = new SP.UserProfiles.PeopleManager(clientContext);

    //Get properties of the current user
    userProfileProperties = peopleManager.getMyProperties();


    //Execute the Query.
    clientContext.executeQueryAsync(onSuccess, onFail);


  function onSuccess() {        



  function onFail(sender, args) {
    alert("Error: " + args.get_message());


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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