Map AD enable value to ServiceNow using LDAP

Admin7267
Tera Guru

We're storing the AD admin account data in one of the custom table u_admin and the issue we're facing is when admin account in AD is inactive we're trying to get 'userAccountControl' values from AD and updating same account inactive in u_admin in ServiceNow.

 

Admin7267_0-1757125455226.png

 

Now I wanted to validate if admin account is active or not using Enable field in AD and if enable is false for a particular account then I wanted to make admin account active false in custom table u_admin 

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Admin7267 

how are you grabbing the Admin account from LDAP and storing in custom table?

In that logic itself you can handle this part as well

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Bhuvan
Tera Sage

@Admin7267 

 

If you are using import sets & transform maps to load the data to custom table u_admin, check whether LDAP is sending the 'enabled' field as part of integration and mapping is enabled. Based on the method of integration, you can update the record in u_admin table to set field active=false.

 

For example, if you are using import set and payload is received, you can check whether field mapping is enabled for active field or you can create transform event function onBefore transform script to update the field value.

 

Below is out of box onBefore transform script for active field mapping for LDAP integration

Bhuvan_0-1757146083250.png

Bhuvan_1-1757146421997.png

If payload is not received, you can check alternate options to query the LDAP on a daily or weekly basis to check whether admin account is active and update the record in u_admin table

 

If this helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan