Event ID 4647 is generated by the Windows Security Auditing subsystem when a user explicitly initiates a logoff action. This event is part of the logon/logoff audit category and requires the "Audit Logoff" policy to be enabled. The event captures the exact moment when a user decides to end their session, providing a clear audit trail of user-initiated session terminations.
The event contains critical information including the user's Security Identifier (SID), account name, domain, logon ID, and logon type. This data helps administrators correlate logoff events with corresponding logon events (4624) to calculate session duration and analyze user behavior patterns. The logon ID field is particularly important as it links the logoff event to the specific logon session that's being terminated.
Windows generates this event through the Local Security Authority (LSA) when the ExitWindowsEx API is called with the EWX_LOGOFF flag, or when users select logoff options through the Windows interface. The event timing is precise, occurring before the actual session cleanup begins, ensuring that all session-related information is still available for logging. This makes Event ID 4647 more reliable than other session termination events for tracking intentional user actions versus system-initiated disconnections.



