zsleo 0 Posted March 3, 2022 I have tried ADSI and a number of other APIs and I am successfully retrieving user credential but can find how to change the ADS user to unlock a user. Does anyone direct me how to or know where to find Delphi code to unlock an Active Directory user account. I could only retrieve status but not find a method to update the ADS record. I am using the ADSI API. Here is and extract of the code: procedure TForm1.btn3Click(Sender: TObject); var lv_User: TADSIUserInfo; lv_Err: string; lv_P: TPassword; begin lbl1.Caption := ''; if ads1.GetUser(gv_Domain, kbmtblUsersUserName.AsString, lv_User, lv_Err) then begin chk1.Checked := lv_User.LockedOut; (... other code to display AD User Details...) end else lbl1.Caption := 'User not found'; end; TIA Share this post Link to post
Steku 0 Posted March 4, 2022 Not shure if it helps, but maybe worth a try... This guy here ist doing some AD user related stuff, unfortunatly the site is only in german available. https://www.rathlev-home.de/tools/admintools.html Greetings Steku Share this post Link to post
zsleo 0 Posted March 4, 2022 11 hours ago, Steku said: Not shure if it helps, but maybe worth a try... This guy here ist doing some AD user related stuff, unfortunatly the site is only in german available. https://www.rathlev-home.de/tools/admintools.html Greetings Steku Thank you. I looked and it seems to put me on the correct track to solve my problem. Share this post Link to post