Mapping manager value from Active Directory (AD) integration

Community Alums
Not applicable

Hi All,

 

In AD, manager value is getting stored in an attribute called "userAttributeExtension15" which is storing some unique values here.

Currently, we are mapping the User ID and Email ID fields to the Email ID of the user.

Can anyone suggest me how I can map Manager value in the transform map.

 

Thank you in advance!

Regards,

Ganesh

 

1 ACCEPTED SOLUTION

David Whaley
Mega Sage

If this is for user imports you should have a manager field in your LDAP import set with the fully qualified domain name.  Something like CN= Full Name, OU = Group Name, OU=Users, DC= domain, DC=local.  You don't need to map the manager field in the transform map.  In the transform script enter the following ldapUtils.setManager(source, target);

 

This is what the out-of-the-box script looks like.

 

//
// The manager coming in from LDAP is the DN value for the manager.  
// The line of code below will locate the manager that matches the
// DN value and set it into the target record. To ignore the manager 
// from LDAP, remove or comment out the line: ldapUtils.setManager(source, target);
//
// NOTE: The 'manager' field SHOULD NOT be mapped in the 'Field Maps' related list
// if the manager is brought in through an LDAP import.  The 'ldapUtils' scripts
// here and in the 'onComplete' Transform Map will map this value automatically.
ldapUtils.setManager(source, target);

 

 The OnComplete transform script

 

//
// It is possible that the manager for a user did not exist in the database when
// the user was processed and therefore we could not locate and set the manager field.
// The processManagers call below will find all those records for which a manager could
// not be found and attempt to locate the manager again.  This happens at the end of the
// import and therefore all users should have been created and we should be able to
// locate the manager at this point
ldapUtils.processManagers();

 

 

View solution in original post

16 REPLIES 16

David Whaley
Mega Sage

If this is for user imports you should have a manager field in your LDAP import set with the fully qualified domain name.  Something like CN= Full Name, OU = Group Name, OU=Users, DC= domain, DC=local.  You don't need to map the manager field in the transform map.  In the transform script enter the following ldapUtils.setManager(source, target);

 

This is what the out-of-the-box script looks like.

 

//
// The manager coming in from LDAP is the DN value for the manager.  
// The line of code below will locate the manager that matches the
// DN value and set it into the target record. To ignore the manager 
// from LDAP, remove or comment out the line: ldapUtils.setManager(source, target);
//
// NOTE: The 'manager' field SHOULD NOT be mapped in the 'Field Maps' related list
// if the manager is brought in through an LDAP import.  The 'ldapUtils' scripts
// here and in the 'onComplete' Transform Map will map this value automatically.
ldapUtils.setManager(source, target);

 

 The OnComplete transform script

 

//
// It is possible that the manager for a user did not exist in the database when
// the user was processed and therefore we could not locate and set the manager field.
// The processManagers call below will find all those records for which a manager could
// not be found and attempt to locate the manager again.  This happens at the end of the
// import and therefore all users should have been created and we should be able to
// locate the manager at this point
ldapUtils.processManagers();

 

 

Community Alums
Not applicable

@David Whaley : The manager attribute from AD is having a similar value that you have mentioned above. 

please confirm me, the manager value is going to be populated automatically by OOB?

If yes, is there any chance we test it before loading all the user records?

If you have the ldapUtils.setManager(source, target); in the transform map script and the onComplete script above it should.  You should be able to test this on a sub-prod instance first though.

Community Alums
Not applicable

@David Whaley : Yes, the suggested scripts are present in the transform map.

In our AD, we have 25000+ users. If we want to test the manager mapping for users, do we need to run the complete load? or is there any way to test it for some 20 sample users?