Tuesday, March 16, 2010

Invalid user found": Exception When a OIM User Changes it's own OIM User Id While Logged into the OIM Web Client

Create is a custom resource object in OIM that is intended to change the OIM User Login. This login needs to be 'approved' by an approver say UserA. When the UserA approves the request, the provisioning task updates UserA's OIM "Users.User ID" with the new login, but then server immediately shows the following errors:

"ERROR,21 Feb 2008 09:07:49,949, RMICallHandler-597 XELLERATE.ACCOUNTMANAGEMENT - Class/Method: tcDataBase/getUser encounter some problems: Invalid user found: UserA" ... ... java.lang.RuntimeException: Invalid user found: UserA "ERROR,21 Feb 2008 09:08:31,564, AJPRequestHandler-RMICallHandler-597 XELLERATE.WEBAPP - Class/Method: tcLogonAction/execute encounter some problems: User account is invalid. Username: UserA"

Steps To Reproduce:
Create a Resource object.
Make the approval for the resource object be approved by the "Request Target User".
Have the target user login.
Have the target user approve the request.
Have the provisioning process alter the target user "Users.User ID"

The cause of the issue is that the Userid used by the user to log into OIM got changed. Due to the changing of the original Userid by the adapter in the session which was created by user's original Userid, the server errors out as its not able to find the original Userid used for login and server throws a "Invalid user found" error.

How to get the Solution

To implement the solution, please execute the following steps::There is no solution or work-around for this issue as changing of it's Userid by the User who is logged inis not correct. One shouldn't do it as OIM keep the Userid information in the session. Changing Userid inthe mid-stream can cause un-foreseen errors