Join our Newsletter — 33% off our NHI Course
Home› Guides› Entity Resolution in Security Logs: Joining Users, Hosts…
Guide SOC & Detection Engineering

Entity Resolution in Security Logs: Joining Users, Hosts and IPs Across Naming Formats

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 14 min read
On this page

Detections and investigations fail quietly when the same user appears as a SID in one log, a UPN in another and an email address in a third, and nobody has written down which strings belong to the same person, host or workload. Entity resolution is the work of mapping every identifier a log source emits for a user, host, IP address or cloud principal back to one stable entity, at the time the event happened. This guide covers the identifier formats you will meet (UPN, sAMAccountName, SID, email, Entra object ID, AWS ARN and principal ID, hostnames, MAC and IP), how DHCP and NAT break the IP-to-host link, how to build and maintain resolution tables, and how to handle service accounts and other non-human identities. It is for detection engineers, SIEM owners and threat hunters, and it assumes you already run a SIEM; for platform design and onboarding, see the SIEM Guide.

Key takeaways

  • Join on immutable identifiers, display on friendly ones. SIDs, Entra object IDs, AD objectGUIDs and AWS unique IDs survive renames; UPNs, emails and distinguished names do not.
  • Every mapping has a time range. IP to host, host to user and even UPN to person change, so resolution tables need valid-from and valid-to columns, not a single current value.
  • DHCP and NAT logs are identity sources. Without lease logs and translation logs with source ports, an IP address in an alert cannot be tied to a device.
  • Normalise once, at ingest. A schema such as OCSF or ECS gives every source the same user and device fields, so detections are written against one shape.
  • NHIs need an owner column. Service accounts, roles and workload identities resolve to a system and an accountable human, not to a person who logged in.

Why entity resolution matters

A detection that counts failed logons per user, or a UEBA baseline that learns what a user normally touches, silently splits one person into several entities when identifiers are not resolved. The same happens to hosts: an EDR agent reports a device ID, a firewall reports an IP, Windows reports a NetBIOS workstation name and the CMDB stores an asset tag. NIST SP 800-53 control AU-6(3) asks organisations to correlate audit record repositories, and NIST CSF 2.0 outcome DE.AE-03 is that information is correlated from multiple sources. Neither can be met if the join keys do not line up.

  • Detection quality: thresholds and sequences (impossible travel, password spray then success, logon then privilege change) only fire when every event lands on the same entity.
  • Investigation speed: analysts lose time pivoting by hand from an IP to a lease, to a hostname, to a logged-on user. Pre-resolved fields turn that into one query.
  • Behavioural analytics: baselines need one entity per person or workload. See the UEBA Guide.
  • Scoping and response: containment needs to know every account a person holds and every device a compromised account touched.

Identity formats

The table lists the user and principal identifiers most SOCs see, with the property that matters for joining: does the value survive a rename or move?

IdentifierExample shapeScope of uniquenessStable for joining?Typical sources
SID (objectSid)S-1-5-21-<domain>-<RID>Never reused, per MicrosoftYes, until a cross-domain move (old SID goes to sIDHistory)Windows Security log (4624 Security ID), Sysmon, EDR
objectGUID128-bit GUIDUnique, assigned at creationYes: Microsoft says it never changes, even on rename or moveDirectory change logs, LDAP exports
sAMAccountNamejsmith (20 characters or fewer), often shown as CONTOSO\jsmithUnique within a domainNo: renameable, and the same value can exist in another domainWindows events (Account Name), file servers, legacy apps
userPrincipalName (UPN)[email protected]Unique among security principals in the forestNo: an administrator can change itKerberos, Entra sign-in logs, SaaS SSO
Email address and proxyAddresses[email protected], plus smtp: aliasesUnique across directory objects (proxyAddresses)No: aliases are added and reassignedMail gateways, DLP, SaaS apps without SSO
Distinguished nameCN=John Smith,OU=Sales,DC=contoso,DC=comUnique at a point in timeNo: changes on rename or OU moveLDAP logs, some VPN and RADIUS logs
Entra object IDGUID (Graph property id)Unique in the tenantYes: Microsoft says treat it as opaque; it is the keyEntra sign-in and audit logs, Graph activity
Entra onPremisesSecurityIdentifierOn-premises SID synchronised to the cloudAs SIDYes: the bridge between AD and Entra recordsGraph user object
AWS ARNarn:aws:iam::123456789012:user/jsmith or arn:aws:sts::123456789012:assumed-role/Role/sessionUnique per account at a timePartly: a deleted and recreated user gets the same ARNCloudTrail userIdentity.arn
AWS principal IDAROA...:SessionName for assumed rolesUnique ID per principalYes for the role or user part; the session name is caller-suppliedCloudTrail userIdentity.principalId

Points that catch people out

  • Account Domain is not one format: Microsoft's documentation for event 4624 says the field can hold the NetBIOS name (CONTOSO), a lowercase or uppercase FQDN, NT AUTHORITY for well-known principals, or the computer name for local accounts. Normalise case and map NetBIOS names to DNS names with a lookup table before joining.
  • Local accounts look like domain accounts: WIN81\Administrator and CONTOSO\Administrator share a name but are different principals. The SID tells them apart.
  • Well-known SIDs are not people: S-1-5-18 (LocalSystem), S-1-5-19 (LocalService) and S-1-5-20 (NetworkService) are the same on every machine. Resolve them together with the host, never on their own.
  • AWS sessions hide the human: an assumed-role ARN names the role and a session name that the caller chose. To reach the person, follow sessionContext.sessionIssuer, the identity provider event that issued the session, or sourceIdentity, which CloudTrail records in sessionContext once administrators require it on role assumption. For IAM Identity Center users, CloudTrail adds onBehalfOf with the Identity Store user ID.
  • Case and encoding: UPNs and email addresses are case-insensitive in practice but stored in mixed case. Lowercase both sides of a join.

Host and IP formats

IdentifierStabilityWhere it comes fromJoin advice
EDR or agent device IDStable per install; changes on reimageEDR, MDMPrimary key for managed endpoints; map reimages through serial number
Machine ID (Windows MachineGuid, Linux /etc/machine-id)Stable per OS install; cloned images can duplicate itOCSF device.os_machine_uuidGood secondary key; watch for duplicates from golden images
Computer account SIDStable while the computer stays domain-joinedWindows events, ADJoins Windows logs to AD; OCSF gives the Windows TargetSID as a device.uid example
Cloud instance ID or ARNStable for the instance lifetime; short for autoscaled hostsCloud APIs and logsKeep history: the same IP will be reused by the next instance
Hostname, FQDN, NetBIOS nameRenameable; NetBIOS truncated to 15 charactersAlmost every logECS recommends the lowercase FQDN in host.name; strip domain suffixes to build a short-name key
MAC addressStable per interface, but randomised on many mobile and Wi-Fi clientsDHCP, NAC, switch logsBridge from DHCP leases to inventory; never treat as unique on Wi-Fi
IP addressChanges with DHCP leases, VPN pools, cloud reuse and NATNetwork, proxy, firewall, authentication logsResolve only with a time range, never as an identity on its own

DHCP

The Windows DHCP server audit log, stored by default in %windir%\System32\Dhcp, writes comma-delimited lines with ID, Date, Time, Description, IP Address, Host Name and MAC Address. Event 10 is a new lease, 11 a renewal and 12 a release. Ingest these (or the equivalent from your DHCP service) into a lease table of IP, MAC, hostname, start and end, then resolve every internal IP in an event to the lease active at the event timestamp. For the security of the service itself, see the DHCP Security Guide.

NAT, proxies and load balancers

  • Source NAT and CGN: many internal hosts share one public address. RFC 6302 (BCP 162) recommends that internet-facing servers log the source port with the source IP, use timestamps accurate to the second or better from a traceable source such as NTP, and record them in UTC. Your own NAT gateways and firewalls need translation logs with original and translated address and port, or an external report about your public IP cannot be traced to a host.
  • Forward proxies and load balancers: the connecting IP is the proxy. Capture X-Forwarded-For or the proxy's own client field; OCSF provides network_endpoint.intermediate_ips for addresses from that header and proxy_endpoint for NAT information.
  • VPN pools: the VPN concentrator log maps the assigned inner IP to the authenticated user for the session. Treat it like a DHCP lease that also carries a user.
  • Time: every one of these joins depends on clocks. NIST SP 800-53 AU-8 covers time stamps, and CIS Controls v8.1 Safeguard 8.4 asks for standardised time synchronisation. See the NTP Security Guide.

Building resolution tables

Resolution tables (also called lookup, watchlist or enrichment tables, depending on the SIEM) hold the mappings that ingest-time or query-time enrichment uses. A workable minimum set:

TableKeyColumnsSource of truthRefresh
PersonInternal person ID (HR or IGA)Name, department, manager, status, start and leave datesHR or identity governanceDaily
AccountImmutable ID (SID, Entra object ID, AWS unique ID, SaaS user ID)All aliases (UPN, sAMAccountName, email, proxyAddresses), account type, person ID or owner, privilege tier, valid from and toAD, Entra, cloud IAM, SaaS admin APIsHourly to daily; change events in near real time
DeviceEDR device ID or asset IDHostnames, FQDN, machine ID, serial, MAC list, owner, criticality, OSCMDB, EDR, MDM, cloud inventoryDaily plus agent check-ins
IP leaseIP plus time rangeMAC, hostname, device ID, source (DHCP, VPN, cloud)DHCP, VPN, cloud network interface logsStreaming
NAT translationPublic IP, port, time rangeInternal IP and portFirewall or NAT gatewayStreaming
Network contextCIDRSite, zone, purpose (server, user, guest, OT), egress pointsIPAMOn change

How to implement

  1. Pick the schema: map sources to OCSF or ECS so every event carries user and device fields in the same place. OCSF's User object holds uid (its examples are the Windows SID, AD DN or AWS user ARN), uid_alt (the AD GUID or AWS principal ID), name, email_addr, domain and type_id (User, Admin, System, Service); its Device object holds uid, uid_alt, hostname, ip and os_machine_uuid. ECS uses user.id, user.name, user.domain, user.email, host.id and host.name, plus related.user and related.hosts arrays for every identifier seen on an event. See the OCSF Guide.
  2. Choose canonical keys: one immutable key per entity type, documented. Keep the friendly name alongside it for analysts.
  3. Load the account and device tables first: these resolve most events. Start with the identity providers and EDR, then add SaaS and cloud.
  4. Add time-bound network tables: DHCP, VPN and NAT. Test by picking ten historical alerts and confirming each IP resolves to the right host for that moment.
  5. Enrich at ingest where you can: write resolved entity IDs into every event, so the mapping that was true at the time is preserved. Query-time lookups against current tables give wrong answers for older events after renames and lease changes.
  6. Populate the related arrays: put every identifier you saw (raw and resolved) into related.user and related.hosts or their OCSF equivalents, so a search for any alias finds the event.
  7. Roll back safely: keep raw fields untouched. If an enrichment rule is wrong, fix the table and re-enrich; never overwrite the original value.

Small teams: start with query-time lookups against an exported AD and EDR list and a DHCP lease table; that covers most internal investigations. Large estates: run a dedicated entity service (often part of the SIEM's UEBA or an asset intelligence platform) fed by change events, with ingest-time enrichment and history retained as long as the logs. See the Asset Inventory and CMDB Security Guide.

Handling NHIs and service accounts

Non-human identities break the assumption that an account resolves to a person. A service account, computer account, AWS role, Entra service principal or API key belongs to a workload, and the person you need during an incident is its owner.

  • Type them: set the account type in the account table and in normalised events. OCSF's user type_id includes System (with Windows computer accounts ending in $ as its example) and Service.
  • Resolve to a system and an owner: columns for application, environment and accountable owner, taken from the NHI inventory. See the NHI Inventory Reconciliation and the NHI Ownership Guide.
  • Keep credentials as entities: access key IDs (CloudTrail accessKeyId) and certificate thumbprints map to the identity that holds them. OCSF has moved credential identifiers to user.programmatic_credentials (credential_uid is deprecated since 1.6.0).
  • Follow delegation chains: a role session started by a CI pipeline, a federated workload or an agent acting for a user should carry both the workload and the originating identity. In AWS, onBehalfOf and sourceIdentity are the fields to capture.
  • Baseline separately: NHIs are predictable, so deviations in source host or API set are strong signals. See the Service Account Security Guide.

Detection and measurement

MetricHow to measureTarget direction
User resolution rateShare of authentication events whose user resolves to an account table rowAbove 98% for identity provider and Windows logs
Internal IP resolution rateShare of internal IPs in network events resolved to a device for the event timeRising; investigate each unresolved subnet
Orphan NHI rateNon-human accounts in the account table with no ownerFalling towards zero
Ambiguous mappingsIdentifiers that resolve to more than one entity in the same window (duplicate machine IDs, shared names)Falling; each one reviewed
Table freshnessAge of the latest load per tableWithin its refresh target
Pivot timeMedian analyst time from alert IP to user and deviceFalling

Alert on enrichment failures as you would on a log source going silent: a sudden fall in resolution rate usually means a table load broke or a new domain, tenant or subnet appeared.

Common failure patterns

  • Joining on display names or UPNs: a rename or a reused UPN merges two people or splits one. Join on SID or object ID.
  • Resolving historical IPs with today's leases: query-time lookups against current DHCP state point investigators at the wrong machine.
  • No NAT or proxy logs: every internet-facing event shows the same egress IP, and external abuse reports cannot be traced.
  • Ignoring local and well-known accounts: Administrator on 500 hosts is 500 principals, and SYSTEM activity is attributed to nobody.
  • Treating roles as people: AWS assumed-role sessions and service principals are counted as users, which inflates user counts and hides the human behind the session.
  • Mixed time zones: devices logging local time without offsets shift every time-bound join; RFC 6302 recommends UTC for this reason.

Framework mapping

FrameworkReferenceRelevance
NIST SP 800-53 Rev 5AU-3 Content of Audit RecordsRecords must identify the subjects and systems involved
NIST SP 800-53 Rev 5AU-6(3) Correlate Audit Record RepositoriesCorrelation across repositories needs shared keys
NIST SP 800-53 Rev 5AU-8 Time StampsTime-bound joins depend on synchronised clocks
NIST SP 800-53 Rev 5CM-8 System Component Inventory; IA-4 Identifier ManagementSources of truth for device and account tables
NIST CSF 2.0DE.AE-03; ID.AM-01; PR.AA-01Correlation from multiple sources; hardware inventory; managed identities and credentials
CIS Controls v8.11.1 Asset inventory; 5.1 Account inventory; 8.4 Time synchronisation; 8.9 Centralise audit logsInputs and preconditions for resolution

Practitioner checklist

  • Document one immutable join key per entity type (person, account, device, workload).
  • Normalise all sources to OCSF or ECS user and device fields at ingest.
  • Build account and device tables with every alias and a valid-from and valid-to range.
  • Ingest DHCP, VPN and NAT translation logs with source ports, and resolve IPs by event time.
  • Map NetBIOS domains to DNS names and lowercase UPNs and emails before joining.
  • Type every non-human account and give it an owner and system in the account table.
  • Capture AWS sessionIssuer, sourceIdentity and onBehalfOf, and equivalent delegation fields elsewhere.
  • Enrich at ingest, keep raw fields, and populate related user and host arrays.
  • Monitor resolution rate, table freshness and ambiguous mappings, and alert on drops.
  • Test quarterly by replaying historical alerts and checking the resolved entities.

Standards and references

Related NHI Mgmt Group resources: SIEM Guide · UEBA Guide · OCSF Guide · Detection Engineering Guide · Log Management and Retention Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.