Hi,
We have developed a web application in which we authenticate the user against Active Directory. We need to capture the users who have not logged into the application from past 5 days. We tried using "lastlogon" attribute, but it is not getting updated always the user is authenticated against Active Directory, So how can we acheive this?
Loading

Muralidharan Dheenadhayalan46 reputationPosted May 23, 2011, 1:51 AM EDT
If it is enabled, then only you LastLogonTime will update otherwise it will not update.
The lastLogontimeStamp attribute is not updated with all logon types or at every logon. The good news is that the logon types that admins usually care about will update the attribute and often enough to accomplish its task of identifying inactive accounts.
Interactive and Network logons will update the lastLogontimeStamp. So if a user logs on interactively, browses a network share, access the email server, runs an LDAP query etc… the lastLogontimeStamp attribute will updated if the right condition is met. (The conditions are discussed below in the section Update and Replication of lastLogontimeStamp.http://blogs.technet.com/b/askds/archive/2009/04/15/the-lastlogontimestamp-attribute-what-it-was-designed-for-and-how-it-works.aspx
hima bindu11 reputationPosted May 23, 2011, 1:55 AM EDT
Thanks for your response...
How can we enable the "InteractiveLogin" option in Active Directory?
The problem with "LastLogonTimestamp" attribute is it is getting updated only once in 14 days. But we want it to get updated with every login... Is that possible?
Muralidharan Dheenadhayalan46 reputationPosted May 23, 2011, 2:04 AM EDT
You configure last interactive logon through a GPO. You must configure the following setting for the GPO with domain controllers in its scope of management if you want to report last interactive logon information to the directory service:
Computer Configuration| Policies | Administrative Templates | Windows Components | Windows Logon Options | Display information about previous logons during user logon = Enabled
http://technet.microsoft.com/en-us/library/dd446680(WS.10).aspx
Hope this helps you.
hima bindu11 reputationPosted May 23, 2011, 2:57 AM EDT
hima bindu11 reputationPosted May 23, 2011, 3:22 AM EDT
hima bindu11 reputationPosted May 23, 2011, 3:39 AM EDT
Posted May 23, 2011, 3:40 AM EDT
hima bindu11 reputationPosted May 23, 2011, 3:43 AM EDT