【发布时间】:2018-04-19 08:26:19
【问题描述】:
我如何知道 AD 用户在哪个设备上锁定了他的帐户?有时,用户登录到多个设备。因此,要找出始终锁定帐户的设备并不容易。
当用户锁定他的帐户时,我已经读出了时间。见下文:
using (PrincipalContext pc_context = new PrincipalContext(ContextType.Domain, "domain", "someUser", "somePassword"))
{
UserPrincipal user = new UserPrincipal(pc_context);
PrincipalSearcher search = new PrincipalSearcher(user);
user.SamAccountName = samAccountName;
UserPrincipal resultUser = search.FindOne() as UserPrincipal;
}
有了这个属性:
resultUser.LastBadPasswordAttempt
我知道用户锁定他的帐户的时间。但是我怎样才能知道发生在哪个设备上?
【问题讨论】:
-
我认为 AD 不会保留此信息。
-
@Damien_The_Unbeliever 我还能怎么做?
标签: c# active-directory