[midPoint] Looking up a user in midpoint to get additional details
Collins, Kevin
K.J.Collins at hw.ac.uk
Sun Oct 22 14:24:11 CEST 2023
Hi all,
I’m _really_ stuck on how to search the midpoint repository to find a user by something other than their username and return some details about that user.
My use case is this:
1. Incoming data feed from HR contains a ‘manager’ value for each user.
2. The manager from HR value is the person_ID of the manager’s record also in the HR data feed:
* user-Y has a ‘manager’ value of ‘12345678’
* ‘12345678’ is the person_ID of user-Y’s manager
3. I need to be able to search the midpoint repo for ‘person_ID=12345678’ and get that object’s username.
4. There should be up to 1 occurrence of that person_ID, in the data since person_ID the immutable primary key in the HR data feed.
I’ve tried midpoint.searchObjectByName(UserType, …) but that only works if I already know the username of the object I’m searching for. I’m trying to _fetch_ the username from midpoint knowing only the person_ID. Same with midpoint.searchObjects(UserType, …).
I’ve tried implementing this lookup in the inbound resource and in a user template. And I’ve looked at loads of midpoint docs to see if there’s an example that I can tweak.
I’m clearly not understanding something!
Can anyone point me in the right direction?
Thanks in advance.
-Kev_C
--
Kevin Collins,
EDINBURGH, EH14 4AS,
________________________________
Founded in 1821, Heriot-Watt is a leader in ideas and solutions. With campuses and students across the entire globe we span the world, delivering innovation and educational excellence in business, engineering, design and the physical, social and life sciences. This email is generated from the Heriot-Watt University Group, which includes:
1. Heriot-Watt University, a Scottish charity registered under number SC000278
2. Heriot- Watt Services Limited (Oriam), Scotland's national performance centre for sport. Heriot-Watt Services Limited is a private limited company registered is Scotland with registered number SC271030 and registered office at Research & Enterprise Services Heriot-Watt University, Riccarton, Edinburgh, EH14 4AS.
The contents (including any attachments) are confidential. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20231022/fd2fc5cd/attachment.htm>
More information about the midPoint
mailing list