Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Deactivating users on MS Active Directory using ABAP program

Former Member
0 Likes
421

Hi folks,

I’m 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

1 REPLY 1
Read only

darren_hague
Product and Topic Expert
Product and Topic Expert
0 Likes
325

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