Purview UAL & Parsing · T1550.001 / T1550.004

Decoding SessionId and CorrelationId Across Purview UAL and Entra ID Logs

Direct Answer (Key Forensic Takeaway)

SessionId (found in Entra Sign-In sessionId and Purview AuditData.SessionId / AppAccessContext.CorrelationId) cryptographically stitches an initial login directly to every downstream Exchange email read, Inbox Rule change, and SharePoint download performed using that stolen token—even when an attacker switches proxy IPs mid-session.

Why This Artifact Matters in M365 Incident Response

Modern Adversary-in-the-Middle phishing kits rarely stay on a single static IP address. Frequently, the initial phishing capture happens on a reverse proxy in Frankfurt while the attacker imports the captured cookies into a residential proxy in Chicago or London minutes later.

Investigators who pivot strictly by ClientIP lose the trail the moment the attacker rotates proxies. Pivoting on Entra’s SessionId and AppAccessContext.UniqueTokenId reconnects the entire multi-IP kill chain back to the exact stolen authentication.

Understanding the two primary GUIDs avoids dead ends: CorrelationId scopes a single isolated authentication transaction (grouping the password check, MFA prompt, and Conditional Access verdict of one sign-in). SessionId, by contrast, is the persistent session identifier minted upon login and carried forward across Non-Interactive refresh tokens, Exchange Online MailItemsAccessed, and SharePoint FileDownloaded records.

In Purview AuditData, SessionId sits either directly at AuditData.SessionId or inside AuditData.AppAccessContext.CorrelationId depending on the workload. Loading both Entra Sign-In JSON and Purview UAL CSV together into AuditVane lets you type one SessionId into the Search bar and isolate every cross-workload action.

1. RAW TELEMETRY Purview UAL & Parsing T1550.001 / T1550.004 2. CLIENT-SIDE PARSE AuditVane Engine SessionId CorrelationId M365 logs 0 Bytes Uploaded 3. SOC OUTCOME Scoped Containment IOCs · CSV · KQL
Local browser DFIR workflow for SessionId CorrelationId M365 logs (T1550.001 / T1550.004)
AdSense-Ready In-Article Placement

Step-by-Step Attack Reconstruction Timeline

An analyst spots a suspicious Non-Interactive sign-in from a Bucharest proxy IP (`45.155.205.19`) accessing Exchange Online. Searching solely for `45.155.205.19` in Purview UAL shows zero hits—because the attacker actually ran `New-InboxRule` earlier from `194.26.135.210` using the same stolen session.

Grabbing the `sessionId` GUID (`d91c4e12-8b30-4f88-a2b1-901234abcdef`) from the Bucharest Entra log and searching it inside AuditVane immediately links the Frankfurt AiTM cookie capture, the My Sign-Ins MFA tampering, the Exchange InboxRule edit, and the Bucharest IMAP sync into one undeniable session timeline.

Cross-Workload SessionId Inside Purview MailItemsAccessed

{
  "CreationTime": "2026-12-02T14:16:04Z",
  "Operation": "MailItemsAccessed",
  "UserId": "hr.lead@contoso-demo.invalid",
  "ClientIPAddress": "194.26.135.210",
  "SessionId": "d91c4e12-8b30-4f88-a2b1-901234abcdef",
  "AppAccessContext": {
    "ClientAppId": "00000002-0000-0ff1-ce00-000000000000",
    "CorrelationId": "d91c4e12-8b30-4f88-a2b1-901234abcdef",
    "UniqueTokenId": "tok_88a9bc10"
  }
}

Here both SessionId and AppAccessContext.CorrelationId preserve the session GUID generated during the earlier Entra Sign-In ceremony, while UniqueTokenId fingerprints the exact short-lived OAuth token.

Even if the attacker swaps proxy IPs for their next API call, SessionId stays constant until the session is revoked or expires.

Forensic Telemetry Fields & High-Signal Indicators

Telemetry Field / Pattern Meaning in M365 / Entra High-Signal Threat Indicator
Entra sessionIdPersistent authentication session GUIDLinks interactive login -> non-interactive refreshes -> mail reads
Entra correlationIdTracks single login transaction / ceremonyGroups MFA prompt + Conditional Access results for 1 login
Purview AuditData.SessionIdSession GUID forwarded to Exchange/SharePointProves two different IPs used the exact same stolen cookie
AppAccessContext.CorrelationIdWorkload correlation token inside PurviewTrace Graph/REST calls back to Entra tokens
AppAccessContext.UniqueTokenIdUnique identifier of issued OAuth access tokenDetects replay of one exact access token across endpoints
RequestIdExchange/Graph per-API request IDUsed primarily when escalating tickets to Microsoft Support

Cross-Table Sentinel KQL & Graph Pivot by SessionId

let TargetSession = "d91c4e12-8b30-4f88-a2b1-901234abcdef";
SigninLogs | where SessionId == TargetSession
| union (AADNonInteractiveUserSignInLogs | where SessionId == TargetSession)
| union (OfficeActivity | where AuditData has TargetSession)
| sort by TimeGenerated asc

Sample Multi-Table SessionId Timeline Output

TimeGenerated        Table                           IPAddress       Action / App
-------------        -----                           ---------       ------------
2026-12-02T14:11:18Z SigninLogs                      194.26.135.210  My Sign-Ins (Success)
2026-12-02T14:16:04Z OfficeActivity                  194.26.135.210  MailItemsAccessed
2026-12-02T14:18:33Z AADNonInteractiveUserSignInLogs 45.155.205.19   Exchange Online (Token Refresh)

CorrelationId vs. SessionId vs. UniqueTokenId in DFIR

IdentifierLifespan ScopePrimary DFIR Pivot Use
correlationId (Entra)Single login attempt (~seconds)Pair Entra Interactive login with Directory Audit consent
sessionId (Entra & Purview)Entire authenticated session (hours/days)Trace stolen AiTM cookie across IP hops & workloads
UniqueTokenIdSingle access token (~60 minutes)Prove exact access-token replay across REST/Graph calls

Step-by-Step Triage, Containment & Verification

  1. Export both Entra Sign-In JSON (Interactive + Non-Interactive) and Purview UAL CSV for the target user.
  2. Drop all exported files simultaneously into AuditVane so they merge into a single UTC timeline.
  3. Click any suspicious Entra sign-in or AV-003/AV-004 flagged row and copy the SessionId value from the Event Inspector.
  4. Paste that SessionId into AuditVane’s Search box to filter every Exchange, SharePoint, and Entra event sharing that session.
  5. Run Revoke-MgUserSignInSession to invalidate every refresh token tied to that SessionId.
  6. Wait 60 minutes (or verify Continuous Access Evaluation enforcement) to ensure zero trailing access tokens remain active.

How to Verify Containment Completed Cleanly

  • All distinct ClientIPs sharing the compromised SessionId documented and blocked if external proxies.
  • Revoke-MgUserSignInSession executed and confirmed via Entra Audit log ("Revoke user sign-in sessions").
  • Zero further Non-Interactive refreshes observed under that SessionId post-revocation.

Analyst Blind Spots, Licensing Quirks & False Positives

Older Exchange Admin cmdlets (RecordType 1) and some basic-auth IMAP flows do not always populate SessionId inside AuditData—so always pivot using both SessionId AND the active compromise time window.

Remember that simply resetting a user password does NOT kill an active SessionId refresh token reliably unless Revoke-MgUserSignInSession is run.

Frequently Asked Questions

Can I load Entra Sign-In JSON and Purview UAL CSV into AuditVane together?

Yes! Drag or select multiple CSV and JSON files together and AuditVane merges, sorts in UTC, and indexes every field including SessionId.

What is the difference between CorrelationId and SessionId?

CorrelationId tracks a single login request or API call, whereas SessionId spans the entire life of the authenticated user session across multiple token refreshes.

Does Revoke-MgUserSignInSession kill an attacker’s active SessionId immediately?

Refresh tokens invalidate immediately, blocking future token renewals; existing short-lived access tokens expire within ~60 minutes (or faster under Continuous Access Evaluation).

Why does AppAccessContext show a GUID for ClientAppId?

It records the Entra Application ID (for example, Outlook Web, Exchange Online, or Graph CLI) that requested the token.

Related Forensics Guides