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?