This sample code is intended to enable AD connector (version prior to 9.1) to delete users that are eSSO enabled. Currently the connector cannot handle the scenario when eSSO stores the users configuration data under the respective user object. The code provided can enhance the connector to delete the leafs associated with the user, enabling the default connector code to delete the user object.
Please note that this issue has been addressed in the 9.1 version of the AD connector by adding the parameter isUserDeleteLeafNode in the IT Resource. By enabling this parameter, the delete operation will use the TreeDeleteControl (1.2.840.113556.1.4.805) to delete all the sub-leafs in one operation.
This fix is done for Bug 6407478 DEPROVISIONING OF AD USER RESOURCE FAILS WHEN THE USER OBJECT HAS LEAF NODES
Software Requirements/Prerequisites
1. Create the following folders in your development workspace:
2. Create the file ADESSOExtension.java in OIM_AD_ESSO/com/custom/AD
3. Copy xliActiveDirectory.jar and xlVO.jar to OIM_AD_ESSO/lib
(the files can be found under current Xellerate home directory)
4. Review the java file and compile it with the command (run the command from OIM_AD_ESSO folder)
javac -classpath lib/xliActiveDirectory.jar;lib/xlVO.jar com/custom/AD/*
5. Build a JAR file containing the class:
6. Copy the JAR file created to OIM_HOME/xellerate/JavaTasks
To configure the adapter to call the custom code perform the following actions:
1. Open Design Console and search for the adapter (AD Delete User) in Adapter Manager
2. Add a Java Task before "Delete user" task
2.1 Functional Task-> Java -> New Object Instance
2.2 Set task name as "Delete Leafs"
2.3 Select API Source as JavaTaskJar:ad_esso.jar
2.4 Select Method as com.custom.AD.ADESSOExtension.deleteUser(....) and click Save
2.5 Map constructor parameters as Adapter Variables -> ADServer (your resource name) in the order:
2.6 Map the method parameters as:
Output: Adapter Variables->Return Variable
Input: Adapter Task->Get Hierarchy
Input: Adapter Task->Get User Object Name
3. Save the adapter and re-build it
super.deleteUser("cn="+username + "," + hierarchy,username);
return true;
}
}