I'm writing an SPFx web part on a SharePoint 2019 on premis environment that should work as a search function to search all user profiles in our company.

All users are currently synchronised every 5 mins to the User Profile Service Application located on the SharePoint 2019 server from a second Active Directory

My plan is to extract user properties from all users in the User Profile Service Application on SharePoint Server 2019 using SharePoint Api.

Trying the endpoint: /_api/web/SiteUsers only gives me a few users, most likely only the ones created on the SharePoint 2019 server locally.

Any input on how to approach this challenge is highly appreciated. I'm kind of lost wondering if what I'm trying to accomplish is at all possible?

1 Answer 1


You may want to check out Work with user profiles in SharePoint. There is a section about common user profile tasks and the endpoints you need to use to complete them.

PnPjs has made these tasks simpler, so I would recommend taking a look at that library if you're working with SPFx.

  • Thank you very much, I found a perfect solution using sp.search from the PNPJS library. I'm targeting the result source Local People Results and this is working just fine. But the results i get seems to be missing some user properties like: "Work Phone" and "Mobile phone". Do you know how to include these properties in the Local People Results?
    – Yens
    Commented Sep 5, 2022 at 6:15
  • Those details should be synced from Active Directory via the user profile service. I'd probably start with checking that the details actually exist in Active Directory for the affected users and then check the user profile synchronisation is configured correctly. Commented Sep 5, 2022 at 8:55

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.