asp.net - C# Active Directory - Query Unsuccessful Login Attempts -


is there way return list of active directory login attempts using c#? example, somehow return list contains following

  • dc name
  • site
  • user state
  • bad pwd count
  • last bad pwd
  • pwd last set
  • lockout time

essentially, know device accessing active directory causing password lockout, on password updates.

i have looked @ using userprincipal class in system.directoryservices.accountmanagement cannot find method allows 1 aggregate across dcs.

thanks in advance or advice!

there's no built in support aggregating across multiple dcs. have handle manually. might started - code give domain controllers. note - if run on computer outside of domain, throw exception.

foreach (var l_domaincontroller in domain.getcurrentdomain().domaincontrollers) {     console.writeline(l_domaincontroller.tostring()); } 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -