‎2007 Feb 13 12:24 PM
Hi folks,
Im working on SAP & MS Active directory integration project, where I wanted to deactivate the user accounts through SAP ABAP program for employees those are terminated.
I guess there should be standard function modules doing this job. I have already checked following function modules but not satisfying my needs.
- LDAP_UPDATE
- LDAP_MODIFY
- LDAP_DELETE
Please update me if you have worked on similar requirements of deactivating the users on MS AD using SAP ABAP program.
Regards,
Amey
‎2007 Nov 06 12:03 PM
Hi Amey,
I don't know if you solved this yet, but we are addressing the requirement by writing the AD attribute accountExpires. This sets the time/date beyond which the account cannot be used, so the user will be unable to log into Windows.
The main trick here is to know that the value you need to write is "the number of 100-nanosecond intervals since Jan 1, 1601". You can calculate this by calculating the number of days since Jan 1, 1601; multiply that number by 864 and then add nine zeroes to the result.
Cheers,
Darren