This report provides an overview of recent user logins across assets, capturing asset names, usernames, associated domains, and Active Directory (AD) status. It identifies whether a user is local or part of AD, checks if their AD account is enabled, and records the last logon time within the past 60 days. The data helps IT administrators monitor user activity, detect inactive or disabled accounts, and ensure compliance with security policies. Results are sorted by asset name and logon time for easy tracking and analysis.

Select Distinct Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblCPlogoninfo.Username,
tblCPlogoninfo.Domain,
IsNull(tblADusers.Username, '(local)') As AD_Username,
Case
When tblADusers.Username Is Null Then '(local)'
When Coalesce(tblADusers.IsEnabled, 0) = 0 Then 'False'
Else 'True'
End As EnabledInAD,
CONVERT(VARCHAR, tblCPlogoninfo.logontime, 120) AS last_logon,
tsysAssetTypes.AssetTypeIcon10 As icon
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
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblCPlogoninfo.logontime > GetDate() - 60 And tblAssetCustom.State = 1
Order By tblAssets.AssetName,
last_logon Desc
Explore the full platform, free for 14 days.
No credit card required.