Quantcast
Channel: SCN : All Content - SAP HANA Cloud Platform Developer Center
Viewing all articles
Browse latest Browse all 3285

Implement a user search on HCP

$
0
0

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


Viewing all articles
Browse latest Browse all 3285

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>