HomeNewsletterCommunityMVP FeedToolsArchiveBlogToday's NewsAboutServicesQuick Links Subscribe free
← Back to Blog
Autopilot Windows AutopilotIntuneEntra IDKerberosW32TimeTroubleshootingPowerShell

The Clock Is the First Dependency: How Time Skew Breaks Autopilot and Looks Like a Network Fault

IA
Imran Awan
21 August 2026

A pallet of refurbished laptops arrives. They were pulled from storage, wiped, and shipped. The first one boots into the out-of-box experience, joins the Wi-Fi, and then stalls. You get a generic failure. Nothing in the message mentions the one thing that is actually wrong.

You spend the afternoon on the wrong problem. You check the Autopilot profile assignment. You check the network endpoints. You check the licence on the test account. Then somebody presses Shift+F10, types date /t, and the machine says it is 2018.

The short version

Kerberos and OAuth both authenticate using timestamps, so a device with a wrong hardware clock cannot authenticate at all. Microsoft documents that Autopilot provisioning can fail with TPM attestation errors or Enrollment Status Page timeouts on devices where the real-time clock is off by a significant amount of time, and the documented fix is w32tm /resync /force at OOBE. The trap is that a device not yet joined to a domain is a stand-alone client, and stand-alone clients have far stricter documented phase-correction limits and a far longer documented poll interval than domain members. A badly wrong clock is therefore discarded rather than corrected. Check w32tm /query /status /verbose and the Time-Service events in the System log before you touch anything else.

The problem: a wrong clock fails as a network problem

Autopilot has no step called "check the clock". There is no screen for it. There is no error string that says the date is wrong.

What you get instead is a failure that looks like something else entirely. Microsoft states the symptom plainly in the Windows Autopilot known issues article, under the heading "Windows Autopilot device provisioning can fail".

Context: Microsoft's documented wording is that "these failures might be because of TPM attestation errors or ESP timeouts on devices where the real-time clock is off by a significant amount of time. For example, several minutes or more." The documented fix is to boot to the start of OOBE, establish a network connection, and run w32tm /resync /force to sync with the default time server time.windows.com.

Read that carefully. Two of the most-searched Autopilot failure classes are listed there. Trusted Platform Module (TPM) attestation errors send you hunting for firmware updates. Enrollment Status Page (ESP) timeouts send you hunting for slow app installs. Neither trail leads to the clock.

The error codes make it worse, because they are honest about the surface and silent about the cause. Microsoft documents error 0x801c03ea in self-deploying mode as meaning "TPM attestation failed, causing a failure to join Microsoft Entra ID with a device token". That is a true statement. It just does not tell you why the attestation failed.

Three fleet realities make this common rather than rare.

Gotcha: Windows stores time internally in Coordinated Universal Time (UTC) and renders it through the timezone. A device can show a plausible local time on screen and still be hours wrong in UTC, which is the value every authentication protocol actually uses. Never validate a clock by looking at the taskbar. Validate the offset.

Why it happens: time is an input to every token check

Both authentication stacks a Windows device uses during provisioning treat time as a security control, not as cosmetics.

Kerberos. The protocol uses timestamps to defeat replay attacks. Microsoft's Kerberos troubleshooting guidance states the requirement without hedging: "The difference in time between the domain controller and the client computer or the target server must be less than five minutes." The policy that enforces it is a real, documented setting with a documented default.

Group PolicyComputer Configuration › Windows Settings › Security SettingsAccount Policies › Kerberos PolicyMaximum tolerance for computer clock synchronization

Microsoft documents the Default Domain Policy value as 5 minutes, and the Domain Controller Effective Default Settings as 5 minutes. Exceed it and the Kerberos client receives KERB_AP_ERR_SKEW, logged as Event ID 4. Microsoft's entire documented remediation for that error is one line: "Make sure that the computer clocks are synchronized."

OAuth and OpenID Connect. Microsoft Entra ID issues JSON Web Tokens carrying iat (issued at), nbf (not before) and exp (expiry) claims. Microsoft's ID token guidance says these "should all fall before or after the current time, as appropriate". A device whose clock is a year behind sees a valid token as not yet valid. A device a year ahead sees it as long expired.

Transport Layer Security. Certificate validity is checked against the local clock too. The Windows Time team described the resulting deadlock better than anyone: "grossly incorrect system time can cause network security to be impaired, which in turn prevents obtaining the current time securely over the network. This is a classic circular dependency."

The part that surprises people: a pre-join device is a stand-alone client

During OOBE, before the Entra join completes, the device is not a domain member. It is what Microsoft's documentation calls a stand-alone client. That distinction changes the Windows Time service (W32Time) defaults substantially, and not in your favour.

Parent key for every value below: HKLM\SYSTEM\CurrentControlSet\Services\W32Time
Subkey and valueDocumented defaultWhy it matters before the join
Parameters\TypeNTP on stand-alone clients, NT5DS on domain membersNT5DS means synchronize with the domain hierarchy. A pre-join device has no hierarchy, so it must use NTP against a named peer.
Parameters\NtpServertime.windows.com,0x1 on stand-alone clients. No default on domain members.Flag 0x1 is SpecialInterval, so the poll cadence comes from SpecialPollInterval rather than the adaptive interval.
TimeProviders\NtpClient\SpecialPollInterval604,800 seconds on stand-alone clients, 3,600 on domain members604,800 seconds is seven days. Without an explicit resync, a stand-alone client is not guaranteed to poll again inside your OOBE window.
Config\MaxPosPhaseCorrection54,000 (15 hours) on stand-alone clients, 0xFFFFFFFF on domain membersA sample indicating a time further in the future than this is discarded, not applied. A clock set to 2018 is never corrected by NTP alone.
Config\MaxNegPhaseCorrection54,000 (15 hours) on stand-alone clients, 0xFFFFFFFF on domain membersSame rule in the other direction. Microsoft documents that when the required change is larger than the limit, the service "logs an event instead".
Config\MaxAllowedPhaseOffset1 second on stand-alone clients, 300 on domain membersAbove this offset the clock is set directly rather than slewed. On a stand-alone client almost any real skew is a hard set.
Config\LargePhaseOffset50,000,000, in 100-nanosecond units, which is 5 secondsOffsets this large are treated as spikes and initially ignored.
Config\SpikeWatchPeriod900 secondsA suspicious offset must persist for 15 minutes before it is accepted as correct. That is longer than many OOBE runs.
Config\UtilizeSslTimeData1 on client versions of Windows that have the featureSecure Time Seeding. Uses timestamps observed in TLS handshakes to seed a grossly wrong clock. Microsoft documents the Windows Server 2025 default as 0.
Config\ClockHoldoverPeriod7,800 secondsIf no provider supplies a sample inside this window, W32Time starts rediscovering its time sources.
TimeProviders\NtpClient\Enabled1Set this to 0 by policy and the device never obtains time over NTP at all.

Put those defaults together and you have the real mechanism. A device whose clock is out by twenty hours is out by more than MaxPosPhaseCorrection. The sample is rejected. The clock stays wrong. Authentication keeps failing. Nothing in the failure mentions time.

Tip: Secure Time Seeding is the reason some badly skewed devices heal themselves and others do not. Microsoft's description is that a Secure Time Seed of High Confidence "is actionable information and it is used to correct grossly incorrect system clocks". It needs the Windows Time service running, internet access, and outbound TLS traffic. Block outbound TLS on your provisioning network and you remove the safety net at exactly the moment you need it.

How to verify: four commands and one event log

Press Shift+F10 during OOBE to get a command prompt. Every check below is read-only.

1. Ask the time service what it thinks. The command w32tm /query /status /verbose is the highest-value single check. Microsoft's own sample output shows which fields to read: Last Successful Sync Time, Source, Phase Offset, and Last Sync Error.

Command Prompt — Shift+F10 during OOBE (illustrative)
C:\> w32tm /query /status /verbose # Healthy: a recent Last Successful Sync Time and a Phase Offset in milliseconds. Leap Indicator: 3(not synchronized) Stratum: 0 (unspecified) Precision: -23 (119.209ns per tick) Source: Local CMOS Clock # "Local CMOS Clock" means it never reached a real time source. This is the smoking gun. Last Successful Sync Time: unspecified Poll Interval: 10 (1024s) Phase Offset: 0.0000000s Last Sync Error: 1 (The computer did not resync because no time data was available.) # Now compare against a reference peer and read the real offset. C:\> w32tm /stripchart /computer:time.windows.com /samples:3 /dataonly Tracking time.windows.com [203.0.113.10:123]. The current time is 2018-04-11 09:14:07. 09:14:07, +259200.4471982s 09:14:09, +259200.4463117s # +259200s is exactly three days. Far outside the five-minute Kerberos tolerance.

2. Ask what it was configured to do, and where that came from. The command w32tm /query /configuration displays the runtime configuration and the source of each setting. Microsoft notes that when NtpServer is set through the Configure Windows NTP Client policy and applied to a domain member, W32Time does not use the NtpServer registry value, so reading the registry alone can mislead you.

3. Check the timezone separately. The command w32tm /tz displays the current timezone settings. A correct UTC offset with a wrong timezone is a different bug from a wrong clock, and it needs a different fix.

4. Read the registry rather than your assumptions. Microsoft also documents w32tm /dumpreg /subkey:Parameters for this, which avoids opening a registry editor during OOBE.

Registry Editor
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters
NtpServer   REG_SZ   time.windows.com,0x1
Type   REG_SZ   NTP
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config
MaxPosPhaseCorrection   REG_DWORD   0x0000d2f0 (54000)
MaxNegPhaseCorrection   REG_DWORD   0x0000d2f0 (54000)
UtilizeSslTimeData   REG_DWORD   0x00000001 (1)
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient
Enabled   REG_DWORD   0x00000001 (1)
SpecialPollInterval   REG_DWORD   0x00093a80 (604800)

The event surface

The Windows Time service writes to the System log under the source Microsoft-Windows-Time-Service. Every event below appears in Microsoft documentation with the wording shown.

Channel: Windows Logs\System  •  Source: Microsoft-Windows-Time-Service
Event IDLevel and documented messageWhat it tells you
35Information. "The time service is now synchronizing the system time with the time source" followed by the source name.A source was selected. Note which one. Local CMOS Clock is not a source.
37Information. "The time provider NtpClient is currently receiving valid time data from" followed by the peer.The happy path. NTP is reachable and returning usable samples.
129Warning. "NtpClient was unable to set a domain peer to use as a time source because of discovery error."Domain hierarchy discovery failed. Expected on a pre-join device still configured for NT5DS.
134Warning. "NtpClient was unable to set a manual peer to use as a time source because of DNS resolution error on 'time.windows.com,0x9'."Name resolution failed for the configured peer. Check DNS before blaming the clock hardware.
139Information. "The time service has started advertising as a time source."Server-side only. Relevant on domain controllers, not on client devices.
142Warning. "The time service has stopped advertising as a time source because there are no providers running." Other documented variants cite the local clock not being synchronized.The provider stack is down, or the local clock fell out of sync with its peer.
144Warning. "The time service has stopped advertising as a good time source."Microsoft's documented check for this is the AnnounceFlags value under W32Time\Config.
24, 29, 38Documented together for virtualized domain controllers where the host and the domain hierarchy both set time.Two providers fighting. The documented fix is to stop one of them, not to widen the tolerance.

One more event sits in the same log under a different source, and it is the one that proves a jump actually happened. Microsoft documents Microsoft-Windows-Kernel-General Event ID 1 as "The system time has changed to" a new time "from" an old time, and states that it is logged every time W32Time updates the clock.

Event Viewer — Windows Logs\System (filtered)
LevelSourceIDDescription
WarningTime-Service134Unable to set a manual peer, DNS resolution error
WarningTime-Service129Unable to set a domain peer, discovery error
ErrorAutopilot171AutopilotManager failed to set TPM identity confirmed
InformationTime-Service35Now synchronizing the system time with the time source
InformationKernel-General1The system time has changed to a new value from an old one

The Autopilot side of the story lives in its own channel. Microsoft documents it at Applications and Services Logs > Microsoft > Windows > ModernDeployment-Diagnostics-Provider > Autopilot, where Event ID 171 is "AutopilotManager failed to set TPM identity confirmed. HRESULT=[error code]" and Event ID 172 is documented as typically related to 171. Seeing 171 next to a Time-Service warning is the correlation that saves the afternoon.

Gotcha: A widely copied troubleshooting tip points at "Event ID 50, the time service detected a time difference of greater than 5000 milliseconds". Be careful with it. The article Microsoft currently publishes for event ID 50 covers Ftdisk lost delayed-write failures on disks, not the time service. Treat any event ID you cannot find in current documentation as unverified, and always match on the event source as well as the number.

The fix: resync now, then fix the fleet default

Step 1, unblock the device in front of you. This is Microsoft's own documented remediation, in Microsoft's own order.

  1. Boot the device to the start of the out-of-box experience.
  2. Establish a network connection, wired or wireless.
  3. Press Shift+F10 to open a command prompt.
  4. Run w32tm /resync /force.
Command Prompt — the documented OOBE remediation (illustrative)
C:\> w32tm /resync /force Sending resync command to local computer The command completed successfully. # If this returns "no time data was available", the resync did not happen. # Microsoft documents three causes: peer not found, UDP 123 blocked, peer not advertising. C:\> w32tm /resync /rediscover # /rediscover redetects the network configuration and rediscovers sources first. C:\> w32tm /query /source time.windows.com,0x1 # Anything other than "Local CMOS Clock" here means you now have a real source.
Watch out: If w32tm /resync returns "The computer did not resync because no time data was available", do not respond by widening MaxPosPhaseCorrection to 0xFFFFFFFF across the fleet. Microsoft explicitly recommends against the 0xFFFFFFFF value, because that value "enables the computer to receive the time that is contained in any time sample, whatever inaccuracy". You would be turning a diagnosable failure into a silent one, and inviting a fleet-wide time jump from a single bad source.

Step 2, confirm UDP 123 is actually open. Microsoft documents that W32Time follows the Network Time Protocol specification, which "requires the use of User Datagram Protocol (UDP) port 123 for all time synchronization", and that the built-in NTP client can only use UDP 123 as its source port. A guest or provisioning VLAN that permits 443 and blocks 123 produces exactly the failure in this article. It is the most common environmental cause and it is trivially testable with a packet capture while you run w32tm /resync /rediscover.

Step 3, set the NTP client by policy so the fleet does not rely on defaults. The Windows Time Service settings are ADMX-backed, so they are available through Group Policy, through the Intune settings catalog, and through the Policy configuration service provider (CSP).

The Group Policy path:

Computer ConfigurationAdministrative Templates › SystemWindows Time Service › Time ProvidersConfigure Windows NTP Client

The Intune settings catalog path:

intune.microsoft.comDevices › ConfigurationCreate › Windows 10 and later › Settings catalogAdministrative Templates › System › Windows Time Service
  1. Sign in to the Microsoft Intune admin center.
  2. Go to Devices, then Configuration, then Create, then New policy.
  3. Choose platform Windows 10 and later and profile type Settings catalog.
  4. Search the catalog for Windows Time Service.
  5. Add Enable Windows NTP Client and enable it. This maps to the Enabled value under W32Time\TimeProviders\NtpClient.
  6. Add Configure Windows NTP Client and set NtpServer, Type and SpecialPollInterval. Microsoft documents the policy defaults as time.windows.com,0x9, NT5DS, and 1,024 seconds respectively.
  7. Assign the profile to your device groups.
  8. Confirm on a target device with w32tm /query /configuration, which reports the source of each setting.

The equivalent Policy CSP entries, for a custom OMA-URI or a non-Microsoft MDM, are ADMX-backed and require the SyncML chr format:

./Device/Vendor/MSFT/Policy/Config/ADMX_W32Time/W32TIME_POLICY_ENABLE_NTPCLIENT
./Device/Vendor/MSFT/Policy/Config/ADMX_W32Time/W32TIME_POLICY_CONFIGURE_NTPCLIENT
./Device/Vendor/MSFT/Policy/Config/ADMX_W32Time/W32TIME_POLICY_CONFIG
Context: The Kerberos tolerance itself has no CSP equivalent. Microsoft documents "Maximum tolerance for computer clock synchronization" as a security policy under Account Policies, and states plainly that "this policy setting is configured on the domain controller". For a cloud-native Entra joined fleet there is nothing to set, and nothing you should want to set. Fix the clocks instead of loosening the protocol.
Tip: Timezone is a separate and genuinely MDM-native setting. Use the Policy CSP TimeLanguageSettings/ConfigureTimeZone, which takes the standard Windows timezone name. Setting the timezone does not correct a wrong UTC clock, and correcting the clock does not fix a wrong timezone. Deploy both.

Step 4, fix the hardware and the staging process. No policy corrects a dead coin cell. Add three things to your intake workflow for refurbished or stored stock. Read the firmware clock before the device ships. Replace flat complementary metal-oxide-semiconductor (CMOS) batteries at the bench. Power each unit on once with network access, so Secure Time Seeding and NTP get a chance to run before a technician is standing over it.

Proof it worked: the readiness report, before and after

The companion script collects the whole picture in one pass. It reports service state, the configured source and type, the last successful sync, the measured offset against a reference peer, the timezone, and whether the offset exceeds the documented five-minute Kerberos tolerance. It is read-only. It never sets the clock and it never calls w32tm /resync.

Two behaviours are worth knowing before you run it. First, if the stripchart measurement returns no usable samples, the script aborts with exit code 1 rather than reporting a healthy clock, because a clean result from a failed measurement is worse than no result. Second, the optional -CheckIntunePolicy switch adds read-only Microsoft Graph GET calls, scoped to DeviceManagementConfiguration.Read.All, that list any Intune configuration policy whose name or description mentions the Windows Time Service. That answers the follow-up question every one of these incidents raises: is the whole fleet still running on built-in defaults?

C:\Temp\Automation\Windows-Autopilot-Scripts\autopilot-time-skew-ntp-token-acquisition-failure\Get-AutopilotTimeSyncReadiness.ps1
PowerShell — illustrative output, not a captured run
PS C:\> .\Get-AutopilotTimeSyncReadiness.ps1 -ReferenceServer time.windows.com === Autopilot Time Sync Readiness === Read-only. Nothing on this device is modified. Domain role : Standalone workstation (pre-join, stand-alone client defaults apply) W32Time service : Running (StartMode: Auto) Configured Type : NTP Configured NtpServer : time.windows.com,0x1 Current source : Local CMOS Clock Last successful sync : unspecified Last sync error : 1 (The computer did not resync because no time data was available.) SpecialPollInterval : 604800 s (7 days) MaxPosPhaseCorrection : 54000 s MaxAllowedPhaseOffset : 1 s Secure Time Seeding : 1 (enabled) Time zone : (UTC+00:00) Placeholder Standard Time Local UTC reading : 2018-04-11 09:14:07Z Measuring offset against time.windows.com (3 samples, UDP 123 required)... Samples collected : 3 Measured offset : 259200.45 s (3 days) Kerberos tolerance : 300 s (documented default is 300 s / 5 minutes) === Verdict === FAIL - the following problems were found: 1. The live time source is the local CMOS clock, which means the device never reached a real time source. 2. There is no recorded successful time synchronisation on this device. 3. The measured offset of 259200.45 s (3 days) exceeds the Kerberos tolerance of 300 s. Kerberos and token validation will fail. 4. The offset also exceeds MaxPosPhaseCorrection (54000 s), so W32Time will discard the sample instead of correcting the clock. An NTP resync alone will not fix this device. Exit code: 2 # After the documented remediation (w32tm /resync /force), the same run reads: Current source : time.windows.com,0x1 Last successful sync : 2026-08-21 09:41:12 Measured offset : 0.043 s === Verdict === PASS - offset is within the documented Kerberos tolerance and the configuration is sane. Exit code: 0

The value of the report is not the pass. It is the shape of the fail. An offset larger than MaxPosPhaseCorrection tells you immediately that no amount of waiting will fix this device, because the sample that would fix it is being discarded by design.

References

Community deep-dive

AuthorArticleWhy it is worth reading
Rudy OomsWindows Autopilot Profile ResiliencyTraces how the Autopilot client handles clock skew during profile download, including the change that has it call SetSystemTime to match the server-supplied PolicyDownloadDate. Useful context for why some skewed devices now recover on their own.
Was this post helpful?
React below — no account needed
Share this post
LinkedIn X / Twitter Reddit Bluesky

More from EndpointWeekly

Autopilot
You Deleted It From Intune and It Still Cannot Re-Enrol:…
A retired Autopilot device is three separate records: the Autopilot registration, the…
Autopilot
Assign User Does Not Lock the Device: What Autopilot…
Assigning a user to an Autopilot device writes two strings to a cloud object and…
Autopilot
Who Owns the Device After Autopilot: Primary User, Device…
Intune sets a device primary user from whoever completed OOBE. That drives Company…