azureblog.co.uk
← cd ~/events
// events/305 · Hybrid join

Event ID 305Hybrid join authentication error

Records the error, sub-error and server error from the authentication phase of hybrid join, typically when getting a token from Entra ID or a federation server (WS-Trust).

LogMicrosoft-Windows-User Device Registration/Admin
SourceMicrosoft-Windows-User Device Registration
AreaHybrid join

What to check

Check the federation service supports WS-Trust and its MEX endpoint, and that the device can reach login.microsoftonline.com in system context (including any proxy).

Codes you'll see in this event

CodeMeaning
0xcaa90017ERROR_ADAL_PROTOCOL_NOT_SUPPORTED: on-premises identity provider does not support WS-Trust.
0xcaa82efdERROR_ADAL_INTERNET_CANNOT_CONNECT: cannot reach login.microsoftonline.com.
0xcaa82f8fERROR_ADAL_INTERNET_SECURE_FAILURE: TLS certificate could not be validated; check clock skew.
0xcaa20003ERROR_ADAL_SERVER_ERROR_INVALID_GRANT: SAML token from the federation server was not accepted.

Find it with PowerShell

Run on the machine that logs it.

powershell2 lines
Get-WinEvent -FilterHashtable @{ LogName = 'Microsoft-Windows-User Device Registration/Admin'; Id = 305 } -MaxEvents 50 |
    Format-List TimeCreated, Id, Message

Hunt for it in Sentinel or Log Analytics

This works once a data collection rule sends the Microsoft-Windows-User Device Registration/Admin log to your workspace, where it lands in the Event table.

kql5 lines
Event
| where TimeGenerated > ago(7d)
| where EventLog == "Microsoft-Windows-User Device Registration/Admin" and EventID == 305
| project TimeGenerated, Computer, Source, RenderedDescription
| order by TimeGenerated desc

Related Hybrid join events

Search all 123 event IDs →