Security · Logon
4647 · User initiated logoff
Event 4647 is logged when a user deliberately initiates a logoff from an interactive, RDP or cached interactive session. Unlike 4634, which fires whenever a session is torn down for any reason, 4647 shows a person (or something acting as them) chose to sign out. It is useful for reconstructing the end of a hands-on-keyboard RDP session.
Where it is logged
Key fields to read
| Field | What it tells you |
|---|---|
| TargetUserName | Account that initiated the logoff. |
| TargetDomainName | Domain of that account. |
| TargetLogonId | Session ID that links back to the 4624 and forward to the 4634. |
| TargetUserSid | SID of the account. |
Sample event
EventID: 4647
TimeCreated: 2026-03-14T03:02:54.207Z
Computer: NW-FS-02.northwind.local
Channel: Security
Keywords: Audit Success
TargetUserSid: S-1-5-21-3623811015-3361044348-30300820-1104
TargetUserName: adm.jlopez
TargetDomainName: NORTHWIND
TargetLogonId: 0x5B1C0A9How to triage it
- 1Match the
TargetLogonIdto the 4624 on the same host to get the logon type, source IP and start time. - 2Confirm a 4634 follows with the same logon ID to close out the session.
- 3Review process creation (4688 / Sysmon 1) for that logon ID during the session.
- 4If the session was suspicious, check whether the user was really at their keyboard at that time, and whether the logoff came right after sensitive activity (log clearing, data staging).
Benign vs suspicious
Usually benign
- Normal end-of-day sign-outs and admins logging off jump servers.
- Scripted logoffs by kiosk or shared-workstation software.
Red flags
- A logoff immediately after defense-evasion activity such as 1102 log clearing or 4719 audit policy changes.
- Admin account RDP sessions on servers that begin and end outside business hours with no ticket.
- A pattern of short RDP sessions with logoffs across several servers in sequence, consistent with an operator moving host to host.
Hunt for it: Splunk & KQL
index=wineventlog EventCode=4647
| eval hour=tonumber(strftime(_time, "%H"))
| where hour < 6 OR hour > 21
| stats count values(host) AS hosts BY userSecurityEvent
| where EventID == 4647
| where hourofday(TimeGenerated) < 6 or hourofday(TimeGenerated) > 21
| summarize Logoffs = count(), Hosts = make_set(Computer) by TargetUserName
| order by Logoffs descField names depend on your add-on and table. More translations in the Splunk vs KQL cheat sheet.
Interview question
“Why might you see a 4634 without a 4647, and does it matter?”
✓ Strong answer sketch
4634 fires whenever a session is destroyed, so network logons, service sessions and system-terminated sessions only produce 4634. 4647 only appears when a user actively logs off an interactive or RDP session. So a type 3 session with only a 4634 is completely normal, but an RDP session with no 4647 may simply have been disconnected rather than signed out, which could mean it is still available to reconnect. In an investigation I use 4647 as evidence that someone deliberately ended the session.
Frequently asked questions
What does Event ID 4647 mean?
Event ID 4647 means a user initiated a logoff from an interactive or Remote Desktop session. It is followed by a 4634 when the session is actually torn down.
Does Event ID 4647 log network logoffs?
No. Network (type 3) sessions are ended by the system and only produce 4634. 4647 is limited to sessions where a user can actively sign out, such as interactive and RDP logons.