Event ID 23: Remote Desktop session logoff succeeded
Written on the destination when a session logs off. Marks the clean end of an RDP session.
- Channel
- Microsoft-Windows-TerminalServices-LocalSessionManager/Operational
- Logged by default
- Yes
- Written on
- Target host
- Volume
- Moderate
- Provider
- Microsoft-Windows-TerminalServices-LocalSessionManager
- Needs a SACL
- No
Key fields
Exact XML field names, as they appear in <Data Name="…"> and in SIEM field extractions.
| Field | What it tells you |
|---|---|
| User | Account that logged off |
| SessionID | Session ID; join to the opening 21 to measure session duration |
Analyst notes
- 01A logoff (23) ends the session, whereas a disconnect (24) leaves it running in the background; the distinction matters for how long an attacker had an active desktop.
- 02Use the 21-to-23 span, keyed on SessionID, as the active-session window for that user.
Pull this event
Retrieval queries for a live host, a collected .evtx file and common SIEMs. Filter further on the key fields above.
Get-WinEvent -LogName 'Microsoft-Windows-TerminalServices-LocalSessionManager/Operational' -FilterXPath "*[System[(EventID=23)]]" -MaxEvents 50 |
Select-Object TimeCreated, Id, MachineName, Message-FilterXPath supports exact matches only. For substring matching, filter in Where-Object.
Where it shows up
Investigations, attack signals and lateral movement techniques that rely on this event.
ATT&CK mapping
Techniques this event can help detect. Most of these depend on specific field values; the event alone does not mean the technique happened.
Related events
Common questions
- What does Windows event ID 23 mean?
- Written on the destination when a session logs off. Marks the clean end of an RDP session. It is written to the TerminalServices LocalSessionManager log (Microsoft-Windows-TerminalServices-LocalSessionManager/Operational).
- Is event 23 logged by default?
- Yes, a default Windows installation records it.
- Where is event 23 recorded?
- In the Microsoft-Windows-TerminalServices-LocalSessionManager/Operational channel on the target host.
Decode a real event
Paste the XML and every value gets explained. Nothing leaves your browser.
Open decoderWritten on the destination when a session logs off. Marks the clean end of an RDP session. Key fields, logging requirements, ATT&CK mapping and ready-to-run queries.