Here is the sample code to revoke the resource object for a user:
Long userKey = getUserKey("OIMUSER0176");
tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env,
OIM_USERNAME, OIM_PASSWORD);
userOp = (tcUserOperationsIntf) ioUtilityFactory
.getUtility("Thor.API.Operations.tcUserOperationsIntf");
tcResultSet resultSet = userOp.getObjects(userKey);
long key = resultSet.getLongValue("Users-Object Instance For User.Key");
userOp.revokeObject(userKey, key);
tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env,
OIM_USERNAME, OIM_PASSWORD);
userOp = (tcUserOperationsIntf) ioUtilityFactory
.getUtility("Thor.API.Operations.tcUserOperationsIntf");
tcResultSet resultSet = userOp.getObjects(userKey);
long key = resultSet.getLongValue("Users-Object Instance For User.Key");
userOp.revokeObject(userKey, key);
No comments:
Post a Comment