Retrieve Last Logon via Service graph connector for SCCM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2025 05:01 AM
Hi Team,
I need help on retrieving Last LogOn Date of computer via Service Graph Connector for SCCM.
Please help on adding SQL Query in "SG-SCCM Computer Identity" Data Source.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2025 05:55 AM - edited ‎01-21-2025 05:56 AM
I think you should connect with SQL team to get proper SQL query from their side as all things and parameters might differ like database name , field names, exact table name etc
However, if you just want a sample query you can check below for reference
SELECT
DISTINCT SYS.Netbios_Name0 AS [Name],
SYS.ResourceID AS [Resource ID],
SYS.Operating_System_Name_and0 AS [Operating System],
SYS.Client_Version0 AS [Client Version],
SYS.Manufacturer0 AS [Manufacturer],
SYS.Model0 AS [Model],
SYS.User_Name0 AS [Primary User],
OS.LastLogonDate AS [Last LogOn Date]
FROM
v_R_System AS SYS
LEFT JOIN
v_GS_OPERATING_SYSTEM AS OS
ON
SYS.ResourceID = OS.ResourceID
------------------------------------------------------------------------------------
v_GS_OPERATING_SYSTEM: Stores operating system details, including the LastLogonDate.
Ensure the SCCM database has the LastLogonDate column populated.