Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to write code (C# or Java) to retrieve user logon/logoff information from ADAM, but i'm not sure where to start or if it's even possible.

share|improve this question
up vote 4 down vote accepted

There is a lastLogonTimeStamp attribute in AD that will give you this information. However to have this attribute your domain must be at least Windows Server 2003 Domain Functional Level. Just because you have 2003 DC's, don't assume that your DFL has been raised to that level if you are having problems getting this attribute.


share|improve this answer

I think there are is a attribute called lastLogon, but i dont remember ever seeing one for logoff time

share|improve this answer
You may prefer to look at lastLogonTimeStamp as lastLogon is not replicated. – jscott Jun 3 '11 at 9:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.