Comments on: Deactivating Users From LDAP https://servicenowguru.com/imports/deactivating-users-ldap/ ServiceNow Consulting Scripting Administration Development Tue, 28 May 2024 20:58:43 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Fer https://servicenowguru.com/imports/deactivating-users-ldap/#comment-7285 Thu, 11 Mar 2021 12:38:09 +0000 https://servicenowguru.wpengine.com/?p=1854#comment-7285 Esto funciona perfecto, para la mayoría de las instalaciones standard. like!

]]>
By: Angus https://servicenowguru.com/imports/deactivating-users-ldap/#comment-7284 Mon, 16 Jun 2014 12:27:25 +0000 https://servicenowguru.wpengine.com/?p=1854#comment-7284 This worked for me, many thanks.

]]>
By: John S. https://servicenowguru.com/imports/deactivating-users-ldap/#comment-7283 Fri, 14 Jan 2011 15:59:14 +0000 https://servicenowguru.wpengine.com/?p=1854#comment-7283 While most user records have the userAccountControl field equal to 514 or 546 to identify a disabled record you cannot be guaranteed that those specific values will be received and in a large implementation there may be hundreds of records that are disabled but have a different value due to additional information about the user’s account.

Since the userAccountControl stores data as a bit-mapped field, you can accomplish this with a simple bitwise compare of the userAccountControl field’s value. Add the following comparision as script overriding a field’s (i.e. – target.active) transform map:

// checking if account is active; bitwise compare

var uac = source.u_useraccountcontrol.toString(16); // change the value to hex

if (uac & 0x2) {

// this account is disabled

answer = 0;

}

else {

answer = 1;

}

You can use the same code snippet for checking for locked out or password expired accounts by changing the compare value from 0x2 to 0x10 or 0x800000 respectively.

Hope its helpful…

]]>
By: Tulio https://servicenowguru.com/imports/deactivating-users-ldap/#comment-7282 Thu, 02 Sep 2010 06:10:16 +0000 https://servicenowguru.wpengine.com/?p=1854#comment-7282 Perfect!!! Thanks for this.

]]>