Reports

Last Logon for Active Windows Devices

Find the Last Logon for Active Windows Devices

This report provides insights into user logon activity across active assets, showing the most recent logon for each detected user in the last 2 days. It cross-references logon data with Active Directory (AD) status, helping IT teams track user access, account activity, and potential security risks. By listing assets, associated usernames, domains, and last logon times, this report enhances security monitoring, compliance, and asset management, ensuring that only authorized users access critical systems.

Last Logon for Active Windows Devices On-Prem Report

Select Top 1000000 tblAssets.AssetID,
  tblAssets.AssetName,
  tblCPlogoninfo.Username,
  tblCPlogoninfo.Domain,
  tblADusers.Username As [AD Username],
  Case
    When Coalesce(tblADusers.IsEnabled, 0) = 0 Then 'False'
    Else 'True'
  End As EnabledInAD,
  Max(tblCPlogoninfo.logontime) As last_logon
From tblAssets
  Inner Join tblCPlogoninfo On tblAssets.AssetID = tblCPlogoninfo.AssetID
  Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
  Left Join tblADusers On tblCPlogoninfo.Username = tblADusers.Username
Where (tblCPlogoninfo.Domain = tblADusers.Userdomain) And
  tblADusers.Username Is Not Null And tblCPlogoninfo.logontime > GetDate() - 2
  And tblAssetCustom.State = 1
Group By tblAssets.AssetID,
  tblAssets.AssetName,
  tblCPlogoninfo.Username,
  tblCPlogoninfo.Domain,
  tblADusers.Username,
  tblADusers.IsEnabled
Order By tblAssets.AssetName

Show

Hide

Ready to get started?

Explore the full platform, free for 14 days.
No credit card required.

Need help evaluating?
Get guidance on pricing at scale and enterprise requirements.
Talk to sales
Clear pricing as you grow
Transparent plans that scale with your environment.
View plans & pricing