cancel
Showing results for 
Search instead for 
Did you mean: 

How to get com.sap.security.api.iuser

Former Member
0 Kudos

Hi,

I have the following problem in WD:

I have the ume id of a user. (let it be "userUmeId")

I need to get the IUser instance.

I tried the following:

IWDClientUser user = WDClientUser.getClientUser("userUmeId");

IUser iUser = user.getSAPUser();

I am getting the current user instead of getting the IUser of "userImeId:.

Could it be that WDClientUser.getClientUser() should get another string? (I know it returns the current user in case it fails to find a matching user for the given string).

How then do I get the desired IUser?

Regards,

Oren.

Accepted Solutions (0)

Answers (3)

Answers (3)

snehal_kendre
Active Contributor
0 Kudos

Hi Buddy,

just try this

IWDClientUser user= null;

user = WDClientUser.getCurrentUser();

String name= user.getSAPUser().getUid();

this method is depricated but works..

still you can try

user.getSAPUser().getUniqueID();

former_member182374
Active Contributor
0 Kudos

Hi Oren,

Try something like this:

IUserFactory userFactory = UMFactory.getUserFactory();

IUser user = userFactory.getUserByLogonID("serUmeId");

Regards,

Omri

Former Member
0 Kudos

Hi,

I think you should specify the client user ID differently. It should be something like: "USER.PRIVATE_DATASOURCE.un:<userUmeId>".

Regards,

Satyajit.