When we have to enable/disable user in active directory, we must move the user between diferent OUs. We have done that without many problems and the user is placed in the correct OU when it is enabled/disabled. But the problem comes after this, when we need to do something else with the user. Usually it is to change the password, but it can be other operations, since these users are managed manually.
The problem is that when we try a second change, IIQ still thinks that the user is in the previous OU and does not find it to change. When we perform a full reconciliation everything works again till we move the user again. As you can imagine, this is not a viable way since there are multiple user request and the full aggregation takes about an hour.
We have tried to perform a single account aggregation using the after provisioning rule, when the request involves an ou movement and the request completes ok. But this creates two ad accounts linked to the user (moreover, if you want to do anything with any of these accounts the modification still fails).
Is there any way to get the AD account ready to modify just after a ou change?
This is the code we use to perform the reconciliation in case there is something wrong in it:
public boolean agregacionIndividual(SailPointContextcontext, Stringaccount, Applicationapplication) {
Stringmetodo =".agregacionIndividual(): ";
boolean resultado =false;
logger.info(regla +metodo +“INICIO”);
logger.info(regla +metodo +“Parametro account: [” +account +“]”);
logger.info(regla +metodo +“Parametro application: [” +application.getName() +“]”);
try {
ConnectorappConnector = sailpoint.connector.ConnectorFactory.getConnector(application,null);
ResourceObjectrObj = (ResourceObject)appConnector.getObject(“account”,account,null);
logger.info(regla +metodo +“ResourceObject: [” +rObj.toXml() +“]”);
if (rObj !=null) {
logger.info(regla +metodo +“El objecto no es nulo. Recuperando regla de customización”);
RulecustomizationRule =application.getCustomizationRule();
logger.info(regla +metodo +“CustomizationRule: [” +customizationRule +“]”);
if (null !=customizationRule) {
try {
logger.info(regla +metodo +“Entrando en la ejecución de la custom rule”);
// Pass the mandatory arguments to the Customization rule for theapp.
HashMap ruleArgs =new HashMap();
ruleArgs.put(“context”,context);
ruleArgs.put(“object”,rObj);
ruleArgs.put(“application”,application);
ruleArgs.put(“connector”,appConnector);
ruleArgs.put(“state”,new HashMap());
// Call the customization rule just like a normal aggregation would.
ResourceObjectnewRObj = (ResourceObject)context.runRule(customizationRule,ruleArgs,null);
logger.info(regla +metodo +“Regla ejecutada”);
// Make sure we got a valid resourceObject back from the rule.
if (null !=newRObj) {
rObj =newRObj;
logger.info(regla +metodo +“Asignando nuevo objeto: [” +rObj.toXml() +“]”);
}
}catch (Exceptionex) {
logger.error(regla +metodo +“Se ha producido una [” +ex.getClass() +“] ejecutando la regla de customización”);
ex.printStackTrace();
}
}
// Aggregation
logger.info(regla +metodo +“Entrando en la agregación”);
sailpoint.object.Attributes argMap =new sailpoint.object.Attributes();
argMap.put(“promoteAttributes”,“true”);
argMap.put(“promoteManagedAttributes”,“true”);
argMap.put(“correlateEntitlements”,“true”);
argMap.put(“noOptimizeReaggregation”,“true”);
argMap.put(“checkDeleted”,“true”);
logger.info(regla +metodo +“Creando agregador con parametros: [” +argMap.toString() +“]”);
Aggregatoragg =new Aggregator(context,argMap);
logger.info(regla +metodo +“Ejecutando agregador”);
TaskResulttaskResult =agg.aggregate(application,rObj);
logger.info(regla +metodo +“Agregacion terminada”);
if (taskResult !=null) {
logger.info(regla +metodo +“Usuario agregado”);
logger.info(regla +metodo +“Resultado tarea: [” +taskResult.toXml() +“]”);
logger.info(regla +metodo +“FIN”);
resultado =true;
}else {
logger.info(regla +metodo +“No se ha encontrado el usuario”);
resultado =false;
}
}else {
logger.info(regla +metodo +“No se ha podido reaizar la agregacion”);
resultado =false;
}
}catch (Exceptione) {
logger.error(“Error genérico: [” +e.getClass() +“]”);
e.printStackTrace();
resultado =false;
}
logger.info(regla +metodo +“Resultado: [” +resultado +“]”);
logger.info(regla +metodo +“FIN”);
return resultado;
}