CB.
CB.

Reputation: 60938

is AuthenticablePrincipal.LastLogon Property the LastLogOnTimeStamp value?

In system.directoryservices.accountmanagement the property LastLogon is the LastLogOnTimeStampValue replicated on all Domain's Domain Controllers or is the more recent values of LastLogon's property derived from the comparison of all available Domain's DC?

I can't find in MSDN where this property is taked.

Upvotes: 5

Views: 1831

Answers (2)

Hans
Hans

Reputation: 13070

The LastLogon property of the AuthenticablePrincipal class reads the lastLogonTimestamp property from the Active Directory object. You can verify this by following the steps listed below:

  1. Opening Active Directory Users and Computers MMC snapin on a domain controller.
  2. Selct Advanced Features from the View menu.
  3. Right click on the Active Directory object (user) which maps to your AuthenticablePrincipal object and choose properties.
  4. Select the Attribute Editor tab. There you will find the lastLogon and lastLogonTimestamp attributes.

On my test system (.Net Framework 4.0, Active Directory 2008 R2) the LastLogon property of the AuthenticablePrincipal class maps to the lastLogonTimestamp property of the releated Active Directory object.

Hope, this helps.

Upvotes: 0

sq33G
sq33G

Reputation: 3360

The answer to your question is: it's not that simple.

http://blogs.technet.com/b/heyscriptingguy/archive/2010/01/27/dandelions-vcr-clocks-and-last-logon-times-these-are-a-few-of-our-least-favorite-things.aspx

If you need better accuracy than +-14 days, you're going to have your work cut out for you.

Upvotes: 3

Related Questions