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?
| Identifier | Example shape | Scope of uniqueness | Stable for joining? | Typical sources |
|---|---|---|---|---|
| SID (objectSid) | S-1-5-21-<domain>-<RID> | Never reused, per Microsoft | Yes, until a cross-domain move (old SID goes to sIDHistory) | Windows Security log (4624 Security ID), Sysmon, EDR |
| objectGUID | 128-bit GUID | Unique, assigned at creation | Yes: Microsoft says it never changes, even on rename or move | Directory change logs, LDAP exports |
| sAMAccountName | jsmith (20 characters or fewer), often shown as CONTOSO\jsmith | Unique within a domain | No: renameable, and the same value can exist in another domain | Windows events (Account Name), file servers, legacy apps |
| userPrincipalName (UPN) | [email protected] | Unique among security principals in the forest | No: an administrator can change it | Kerberos, Entra sign-in logs, SaaS SSO |
| Email address and proxyAddresses | [email protected], plus smtp: aliases | Unique across directory objects (proxyAddresses) | No: aliases are added and reassigned | Mail gateways, DLP, SaaS apps without SSO |
| Distinguished name | CN=John Smith,OU=Sales,DC=contoso,DC=com | Unique at a point in time | No: changes on rename or OU move | LDAP logs, some VPN and RADIUS logs |
| Entra object ID | GUID (Graph property id) | Unique in the tenant | Yes: Microsoft says treat it as opaque; it is the key | Entra sign-in and audit logs, Graph activity |
| Entra onPremisesSecurityIdentifier | On-premises SID synchronised to the cloud | As SID | Yes: the bridge between AD and Entra records | Graph user object |
| AWS ARN | arn:aws:iam::123456789012:user/jsmith or arn:aws:sts::123456789012:assumed-role/Role/session | Unique per account at a time | Partly: a deleted and recreated user gets the same ARN | CloudTrail userIdentity.arn |
| AWS principal ID | AROA...:SessionName for assumed roles | Unique ID per principal | Yes for the role or user part; the session name is caller-supplied | CloudTrail 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
| Identifier | Stability | Where it comes from | Join advice |
|---|---|---|---|
| EDR or agent device ID | Stable per install; changes on reimage | EDR, MDM | Primary 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 it | OCSF device.os_machine_uuid | Good secondary key; watch for duplicates from golden images |
| Computer account SID | Stable while the computer stays domain-joined | Windows events, AD | Joins Windows logs to AD; OCSF gives the Windows TargetSID as a device.uid example |
| Cloud instance ID or ARN | Stable for the instance lifetime; short for autoscaled hosts | Cloud APIs and logs | Keep history: the same IP will be reused by the next instance |
| Hostname, FQDN, NetBIOS name | Renameable; NetBIOS truncated to 15 characters | Almost every log | ECS recommends the lowercase FQDN in host.name; strip domain suffixes to build a short-name key |
| MAC address | Stable per interface, but randomised on many mobile and Wi-Fi clients | DHCP, NAC, switch logs | Bridge from DHCP leases to inventory; never treat as unique on Wi-Fi |
| IP address | Changes with DHCP leases, VPN pools, cloud reuse and NAT | Network, proxy, firewall, authentication logs | Resolve 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:
| Table | Key | Columns | Source of truth | Refresh |
|---|---|---|---|---|
| Person | Internal person ID (HR or IGA) | Name, department, manager, status, start and leave dates | HR or identity governance | Daily |
| Account | Immutable 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 to | AD, Entra, cloud IAM, SaaS admin APIs | Hourly to daily; change events in near real time |
| Device | EDR device ID or asset ID | Hostnames, FQDN, machine ID, serial, MAC list, owner, criticality, OS | CMDB, EDR, MDM, cloud inventory | Daily plus agent check-ins |
| IP lease | IP plus time range | MAC, hostname, device ID, source (DHCP, VPN, cloud) | DHCP, VPN, cloud network interface logs | Streaming |
| NAT translation | Public IP, port, time range | Internal IP and port | Firewall or NAT gateway | Streaming |
| Network context | CIDR | Site, zone, purpose (server, user, guest, OT), egress points | IPAM | On change |
How to implement
- 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.
- Choose canonical keys: one immutable key per entity type, documented. Keep the friendly name alongside it for analysts.
- Load the account and device tables first: these resolve most events. Start with the identity providers and EDR, then add SaaS and cloud.
- 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.
- 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.
- 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.
- 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
| Metric | How to measure | Target direction |
|---|---|---|
| User resolution rate | Share of authentication events whose user resolves to an account table row | Above 98% for identity provider and Windows logs |
| Internal IP resolution rate | Share of internal IPs in network events resolved to a device for the event time | Rising; investigate each unresolved subnet |
| Orphan NHI rate | Non-human accounts in the account table with no owner | Falling towards zero |
| Ambiguous mappings | Identifiers that resolve to more than one entity in the same window (duplicate machine IDs, shared names) | Falling; each one reviewed |
| Table freshness | Age of the latest load per table | Within its refresh target |
| Pivot time | Median analyst time from alert IP to user and device | Falling |
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
| Framework | Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev 5 | AU-3 Content of Audit Records | Records must identify the subjects and systems involved |
| NIST SP 800-53 Rev 5 | AU-6(3) Correlate Audit Record Repositories | Correlation across repositories needs shared keys |
| NIST SP 800-53 Rev 5 | AU-8 Time Stamps | Time-bound joins depend on synchronised clocks |
| NIST SP 800-53 Rev 5 | CM-8 System Component Inventory; IA-4 Identifier Management | Sources of truth for device and account tables |
| NIST CSF 2.0 | DE.AE-03; ID.AM-01; PR.AA-01 | Correlation from multiple sources; hardware inventory; managed identities and credentials |
| CIS Controls v8.1 | 1.1 Asset inventory; 5.1 Account inventory; 8.4 Time synchronisation; 8.9 Centralise audit logs | Inputs 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
- OCSF: Open Cybersecurity Schema Framework schema repository
- Elastic: Elastic Common Schema (ECS)
- Microsoft: Security identifiers
- Microsoft: Naming properties in Active Directory
- Microsoft: Graph user resource type
- AWS: CloudTrail userIdentity element
- IETF: RFC 6302 Logging Recommendations for Internet-Facing Servers
- NIST: SP 800-92 Rev. 1 Cybersecurity Log Management Planning Guide (initial public draft)
Related NHI Mgmt Group resources: SIEM Guide · UEBA Guide · OCSF Guide · Detection Engineering Guide · Log Management and Retention Guide