LDAP Update Only

utente
Giga Expert

Hi All,

I need to update the list of the users present in my "sys_user" table by LDAP, without import new users.

How is possible skip the "insert" activity and allow only the "update" activity in the LDAP import configuration?

Best Regards

Vincenzo

1 ACCEPTED SOLUTION

Patrick DeCarl1
ServiceNow Employee
ServiceNow Employee

Hi,



In your transfer map, create a onbefore script and use below code.



if (action == 'insert')


ignore = true;


View solution in original post

3 REPLIES 3

Patrick DeCarl1
ServiceNow Employee
ServiceNow Employee

Hi,



In your transfer map, create a onbefore script and use below code.



if (action == 'insert')


ignore = true;


Ankur Bawiskar
Tera Patron
Tera Patron

Hi Vincenzo,



There should be a transform map for users. in the onbefore transform map script add this


Name of transform map - LDAP User Import -> may be different in your case



if(action == 'insert')


ignore = true;





Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

patbishop
Mega Guru

I have a similar question.  I need to be able to perform different transform depending on whether it is an INSERT of a NEW user, or and UPDATE of an existing user. 

Essentially, if the user doesn't exist in SN, I want to pull several attributes from LDAP (street,city, state, zip, office ,company, phone etc), however, if the user already exists in SN, then I only want to update a specific set of attributes. The reason for this is the client uses SN as their most recent set of contact information for their users.  They DO NOT want SN updating their LDAP, so I need to prevent some fields from being updated.  

Can this also be accomplished via script?