I wanted Windows Security events from a domain-joined Windows 11 Pro workstation in Microsoft Sentinel. The usual route for an on-prem machine is Azure Arc plus the Azure Monitor Agent extension. On Windows 11 Pro, that route doesn’t work, and the supported one runs through Microsoft Entra hybrid join.

Why workstation logs, and why the method matters

Workstations are where phishing lands and where credentials get stolen, so their sign-in and logon events belong in the SIEM next to the identity logs. Getting them there with a supported method matters as much as getting them there at all: an agent that only looks installed is worse than none, because you think you have coverage you don’t.

Check the OS edition before you pick an install method

I onboarded the workstation to Azure Arc and added the Azure Monitor Agent (AMA) extension through a data collection rule. Arc said Connected and the extension said Enabled, but no Heartbeat and no SecurityEvent rows arrived. On the machine itself, there was no AzureMonitorAgent service. Azure thought the agent was installed. It never landed.

Microsoft’s AMA support table explains why. Windows 11 Client and Pro need the AMA client installer for Windows client devices, while Windows 11 Enterprise is supported directly [1]. The client installer is an MSI, and it needs the machine to be Microsoft Entra joined or hybrid joined, because the agent authenticates with the device’s Entra token [2]. Hybrid-joined Windows clients don’t need Arc at all [2].

So the plan became: hybrid join first, then the MSI, then remove Arc.

Hybrid join with Cloud Sync

My directory sync is Microsoft Entra Cloud Sync, not Entra Connect, so device sync is set up differently [3]:

Service connection point (SCP). Run Microsoft’s ConfigureSCP.ps1 as an Enterprise Admin. When the tenant isn’t federated, the domain parameter is the tenant’s *.onmicrosoft.com domain, not your custom domain [3]. I used my custom domain the first time and had to run it again.

Device sync. In the Cloud Sync configuration’s properties, enable device sync. This needs at least the Hybrid Identity Administrator role [3]. My Security Administrator account showed the configuration as “Invalid configuration” with a license warning. The real issue was the role.

Let the device write its certificate. After gpupdate /force, a restart and a sign-in with a normal domain user, the device writes a certificate to its own computer object. Check it on a domain controller before syncing:

Get-ADComputer <computer-name> -Properties userCertificate | Select-Object -ExpandProperty userCertificate | Measure-Object

Sync the device. In Cloud Sync, Provision on demand > Device tab, with the computer’s distinguished name [3]. Finish the join. The device completes its half at sign-in or when the join task runs. To run it now:

schtasks /Run /TN "\Microsoft\Windows\Workplace Join\Automatic-Device-Join"
dsregcmd /status

When the join fails, read the server’s answer

The device stayed AzureAdJoined : NO. The User Device Registration event log showed five events, and only one mattered. The useful detail was in dsregcmd /status, in the Previous Registration section, which shows the server’s own error [4]:

Server Message : failed to validate timestamp in computerIdentityData

The clocks were wrong. In a domain, members take time from a domain controller, and domain controllers take it from the PDC emulator, which should sync from a reliable external source. Kerberos only tolerates five minutes of difference by default [5]. Mine were off on the hypervisor, the domain controller and the workstation.

On the domain controller holding the PDC emulator role:

w32tm /query /status
w32tm /config /manualpeerlist:"time.windows.com,0x8 pool.ntp.org,0x8" /syncfromflags:manual /reliable:yes /update

On the workstation:

w32tm /config /syncfromflags:domhier /update
w32tm /resync /rediscover

The workstation VLAN also needed a firewall rule for UDP 123 to the domain controller. After the clock fix, the device briefly couldn’t read its own computer object because of stale Kerberos tickets. Clearing the computer account’s tickets and restarting once fixed it, without any domain admin credentials touching the workstation:

klist -li 0x3e7 purge
Test-ComputerSecureChannel

dsregcmd /status then showed AzureAdJoined : YES.

Swap Arc for the client installer

The AMA MSI refuses to install on an Arc-enabled machine, so Arc had to go:

azcmagent disconnect --force-local-only

Then uninstall the Azure Connected Machine Agent, delete the machine’s Arc resource in Azure, and install the MSI from a folder AppLocker allows:

msiexec /i AzureMonitorAgentClientSetup.msi /qn /L*V ama_install.log
Get-Service AzureMonitorAgent

Client devices don’t get a data collection rule one by one. You create a monitored object that represents the whole Entra tenant, in the same region as the rule, and associate the rule with it. Every client running the MSI picks it up [2]. This is a tenant-level resource, so it needs elevated access and the Monitored Objects Contributor role [2]. I removed that role and turned elevated access back off once the association existed.

Then, in Sentinel:

Heartbeat
| where Computer has "<computer-name>"
| project TimeGenerated, Computer, Category

SecurityEvent
| where Computer has "<computer-name>"
| summarize count() by EventID

Both return rows, and Heartbeat’s Category reads Azure Monitor Agent.

References

  1. Azure Monitor Agent supported operating systems and environments
  2. Set up the Azure Monitor Agent on Windows client devices
  3. Configure device sync with Microsoft Entra Cloud Sync
  4. Troubleshoot devices by using the dsregcmd command
  5. How to configure the Windows Time service against a large time offset

Comment section

Sorry babes, you have to sign into Github to comment. Feel free to let me know what's on your mind!