Hi,
I am trying to implement a people(user) search within an HCP Java Service. So essentially, I want to lookup user information such as first name, last name and email for a given user ID (not my own user, but others).
I tried using code like this:
InitialContext ctx;
ctx = new InitialContext();
UserProvider userProvider = null;
userProvider = (UserProvider) ctx.lookup("java:comp/env/user/Provider");
User user = userProvider.getUser(userId);
This works fine for my own user which is logged in, but other users are not found this way.
Is there any way one can implement a user lookup ? Is this even provided from a security perspective ?
Thanks,
Best regards,
Stefan