Event ID 21: Remote Desktop session logon succeeded
Written on the RDP destination when a session logon completes. Records the user, the session ID and the source network address.
- 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 on, in DOMAIN\user form |
| SessionID | Terminal Services session ID; the pivot that ties 21/22/23/24/25 for the same session together |
| Address | Source network address of the client. 'LOCAL' means a console (physical) logon, not a network RDP logon; an IP means a remote client |
Analyst notes
- 01This log survives Security log clearing and records the source IP, which makes 21 a backbone event for building an RDP timeline on the destination.
- 02Address = LOCAL is a console session (including the Hyper-V/VMware console), not remote RDP; do not treat LOCAL as an external connection.
- 03Correlate 21 with Security 4624 Type 10 (same user and time) and with RCM 1149 (network auth) to separate authentication from an actual interactive session.
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=21)]]" -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.
- Lateral movementRDP lateral movementDestination: Session logon succeeded, with the account and source address.
- InvestigationWho connected to this host over RDP, from where, and when did they leave?Pin each session's lifecycle
- InvestigationWhere did this account log on, and was it used for lateral movement?Confirm lateral movement by technique
- InvestigationWhen did the attacker first get in? Building the initial access timelineIdentify the remote-entry channel
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 21 mean?
- Written on the RDP destination when a session logon completes. Records the user, the session ID and the source network address. It is written to the TerminalServices LocalSessionManager log (Microsoft-Windows-TerminalServices-LocalSessionManager/Operational).
- Is event 21 logged by default?
- Yes, a default Windows installation records it.
- Where is event 21 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 RDP destination when a session logon completes. Records the user, the session ID and the source network address. Key fields, logging requirements, ATT&CK mapping and ready-to-run queries.