Need to map the managed by field from Active Directory to the group table manager field

daniellethomson
Tera Expert

We utilize the managed by field in AD for Security Group approvals. I have this field mapped to populate the manager field on the sys_user_group table but AD populates this field based on the users OU. Our issue is that ServiceNow is not reading this as a user and is creating new user records. Our infrastructure team believes this cannot easily be changed to first name last name in AD. So, my question, how do we get ServiceNow to read this field as a user or should we be pulling another field from AD to populate the manager of the group?

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

Did you try make it larger again and Executing a scheduled import?


View solution in original post

16 REPLIES 16

Michael Fry1
Kilo Patron

On the Group transform map, we're using the Script field to handle the mapping. No Field Map should be necessary. This is the out of the box code:


//


// 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.   If you are not


// interested in getting the manager from LDAP then remove or


// comment out the lines below


ldapUtils.setManagerField('u_managedby');


ldapUtils.setManager(source, target);


Yes, we are using that script as well instead of the field mapping option. I should have made that clear. it is still populating incorrectly as stated above.


And you're using the onStart Transform script:


gs.include("LDAPUtils");


var ldapUtils = new LDAPUtils();


ldapUtils.setLog(log);


yes, it's active. The field populates but with the above information highlighted in yellow.