Hello,
I have a requirement to get all users of a manager, so what will be the best way to achieve this in SharePoint online (office 365)
So suppose “User A” is manager of ‘user A1’, ‘user A2’ and ‘user A3’ etc
Then i need to show only these 3 users (user A1, User A2 and user A3) in my custom page when “User A” (manager) logged in.
So how i can do this using Jqury or rest api ?
OR if any other way is their to do so please suggest.
I’m not aware of any way to do this, except possible using the SharePoint Search REST API.
A sample query that could work may be…
_api/search/query?querytext=’*’&refinementfilters=’Manager:equals(“companyuser”)’&sourceid=’B09A7990-05EA-4AF9-81EF-EDFAB16C4E31′
What this is doing is calling the search api to find any items in the user “people” result source, where their manager is “companyuser”. If you need more information on the REST API look hereÂ