LDAP - Manager field not getting populated

ericroberts
Tera Contributor

I have a new LDAP setup and the managers have never correctly loaded in.  One of our folks noticed that the incoming 'manager' field was being truncated...so he increased the default char size of the ldap_import table manager field to 160.  Manager is still not loading in. 

To try to isolate the issue I nuked all users from the sys_user table (except admin accounts) ... and now I am only pulling in 4 names from LDAP.  One manager (Sally) and 3 direct reports as defined in Active Directory and verified in LDAP.  (Joe, John, Bill).  I clean out the sys_user table...force a scheduled load of these 4 names...they come in fine.  But no manager field.  

In my transform map I have it set to Run script...and I even added the following code to the end of the script to prove it was firing:

target.u_usda_eauth_id_test='USDAEAUTHTESTID';

After the load of the LDAP records all users have this USDAEAUTHTESTID string in that field...so I assume 

ldapUtils.setManager(source, target);

is firing.  

Everything else is out of the box for onBefore, onStart and onComplete.  

I even tried running the ldapUtils.processManagers() in a Background Scripts window...it says it ran with no errors...but again, no managers.

gs.include("LDAPUtils");
var ldapUtils = new LDAPUtils();
//ldapUtils.setLog(log);
ldapUtils.processManagers();

Any ideas?

Thank you !!!

ER

PS: On a side note...where do I find ldapUtils to go look at how it works??

18 REPLIES 18

I did notice one thing that is different in your screenshot...not sure if it has to do with our versions.  I'm on Jakarta Patch 8 on this instance.

 

But below your Order field you show a "Map" field...I do not show that field on my onComplete script page.

Thank you,

 

ER

Ok Ok...I found it ... YES...the "manager" field in that import set is being filled with the full DN of the manager.

I went to LDAP Imports, grouped by set, saw last set I ran (ISET0010086) had the 3 records I imported.  

Set column shows ISET0010086 for all 3 records...Trget Record has user names...common names.

 

If I click the hotlink ISET0010086 from one of the rows in the Set column I see hte Import set results.with tabs for Import Set Runs (1) and Import Set Rows(3)

If I click on the timestamp  hotlink in the Created column for one of the rows I see a page of LDAP fields.  And YES...:) ... manager is full with an LDAP type string

ie: CN=username,OU=WO,OU=NFS,OU=ENDUSERS,OU=_FOREST_SERVICE,OU=FS,OU=Agencies,DC=usda,DC=net

 

When I  click on the user name hotlink in the Target Record column ... I see the user record and nothing in the Manager field.

 

Whew...ok closer I think!!  

Thanks!!

ER

Ok so we are getting data from LDAP. Now go to transform map. and send me screenshot of Field Maps and Transform Script tab.

https://XXX.service-now.com/sys_transform_map_list.do?sysparm_query=target_table%3Dsys_user%5Eactive%3Dtrue

Also make sure you have below on Transform map.

 

find_real_file.png

Sorry I replied to my main post accidentally ...please see that reply for the screenshots and clips of each script.  Thank you very much for your help!

 

ER