Every device that Windows Autopilot knows about carries a marker. It is not the serial number. It is not the group tag. It is a value called the ZTDID, and it lives on an object in Microsoft Entra ID that you never created by hand. When that marker is present, your dynamic device groups fill up and your Autopilot deployment profiles land where you expect. When it is absent, the device still enrols. It still appears in Intune. It still reports as compliant. And it quietly behaves like a machine somebody built manually, because as far as group membership is concerned, that is exactly what it is.
ZTDID is short for Zero Touch Device ID. It sits inside the physicalIds collection on the Microsoft Entra ID device object that Autopilot registration creates, and every dynamic group rule Microsoft publishes for "all Autopilot devices" tests for that marker. A device without it never joins the group, so it never gets a deployment profile, and nothing in the Intune portal explains why. Microsoft does not document any ZTDID field on the device itself, so the only reliable way to audit a fleet is Microsoft Graph.
The problem: a device that enrolled cleanly and still behaves hand-built
The ticket usually reads like a contradiction. A laptop was registered with Autopilot months ago. It shows up in the Autopilot devices list with the right serial number. It shows up in Intune as an enrolled, compliant, Microsoft Entra joined Windows device. But the dynamic group that is supposed to contain every Autopilot device does not contain it. No Autopilot deployment profile is assigned. Any configuration you target at that group skips the machine entirely.
Here is what that looks like in the portal. The device record exists and looks entirely normal.
Most engineers chase this in the wrong direction. They check the group tag. They re-save the deployment profile. They force a sync. They rebuild the dynamic group rule from memory. None of that helps, because the missing piece is not in Intune at all. It is a single string on the Entra ID device object, and the Intune portal never shows it to you.
ZtdDeviceIsNotRegistered and ZtdDeviceHasNoAssignedProfile. The same three letters open the ZTDID. Once you know the prefix, the naming across the whole feature area starts making sense.Why it happens: the marker lives on an object you never created
Autopilot registration does two things at once. The obvious one is that a hardware hash gets uploaded and associated with your tenant ID. The less obvious one is that Microsoft Entra ID gets a brand new device object, created before anybody has ever signed in on the hardware.
Microsoft is explicit about this. The registration overview states that when an Autopilot device is registered, it automatically creates a Microsoft Entra object, and that the Autopilot deployment process needs that object to identify the device before the user signs in. The troubleshooting FAQ puts it more bluntly: that object acts as Autopilot's anchor in Microsoft Entra ID for group membership and targeting, including the profile.
That anchor object is where the ZTDID lives. In Microsoft Graph, the property is physicalIds on the device resource. It is a string collection, and Microsoft's own reference labels it "For internal use only." In Entra ID dynamic membership rules, the same data is addressed as devicePhysicalIds. Two names, one collection.
The three bracketed keys Microsoft documents
Entries in that collection are prefixed with a key in square brackets. Microsoft documents exactly three of them for Autopilot purposes, and each one answers a different question.
| Bracketed key | What it identifies | Where the value comes from |
|---|---|---|
[ZTDId] | That the device is registered with the Autopilot deployment service at all. This is the registration marker. | Written when the Entra device object is created during Autopilot registration. |
[OrderID] | The group tag. Microsoft states that Intune's group tag field maps to the OrderID attribute on Entra devices. | The group tag you set on the Autopilot device record. |
[PurchaseOrderId] | The purchase order identifier, normally supplied by the OEM, reseller, or distributor. | The purchaseOrderIdentifier on the Autopilot device identity. |
The distinction matters enormously. [OrderID] is a label you chose and can change. [ZTDId] is not a label. It is proof of registration. A device can have a perfectly correct group tag on its Autopilot record and still have no ZTDID on its Entra object, and in that state no group rule can ever find it.
Why the marker goes missing
There are a handful of documented ways a device ends up enrolled without the marker. Understanding which one applies tells you how to fix it.
- The device was Entra registered before it was Autopilot registered. Microsoft's FAQ describes this case directly. If a workplace-joined or MDM-only enrolled device is not deleted from Entra ID before being joined, the previous trust type is retained. You end up with a device object that predates the Autopilot registration, and that object was never the one Autopilot pre-created.
- The device enrolled without ever being registered. A standard Entra join plus automatic MDM enrolment produces a working, compliant, managed device. It produces no Autopilot registration, so there is no ZTDID. The MS Graph reference for listing devices even shows a sample device with
"physicalIds": [], an empty collection, for exactly this kind of machine. - Registration was added later and has not landed yet. If you enabled Convert all targeted devices to Autopilot, Microsoft says to allow 48 hours for the registration to be processed. During that window the device is enrolled and the marker is not there yet.
- Deregistration left the object behind. Microsoft documents that removing an Autopilot registration does not automatically delete the Entra device object for devices that are or were enrolled in MDM. The registration is gone, the object survives, and the two records disagree.
"[ZTDid]", and the Entra dynamic membership reference writes "[ZTDId]". Both work, because the dynamic rules engine documentation states that regex and string operations are not case sensitive. The part that is case sensitive is the property name, and the same two articles disagree there too, using devicePhysicalIDs and devicePhysicalIds. Do not retype these rules from memory. Paste them verbatim and let the portal validate the syntax before you save.How to verify: reading physicalIds, and what the device can and cannot tell you
There are three places worth looking, and they are useful in a specific order. Start in the cloud, because that is where the marker actually is.
Step 1: read physicalIds from Microsoft Graph
The Entra portal does not expose physicalIds on a device blade. Graph is the documented read path. The least privileged permission for listing devices is Device.Read.All, for both delegated and application access.
That empty collection is the whole diagnosis. No [ZTDId] entry means no dynamic group membership, which means no profile assignment, which means the device behaves exactly like one somebody imaged by hand.
physicalIds supports for $filter: eq, not, ge, le, startsWith, /$count eq 0, and /$count ne 0. No official example shows the collection filter syntax for the ZTDID prefix specifically, so for an audit across a whole tenant it is safer to select physicalIds and filter client-side in PowerShell. You get a result you can reason about instead of a filter expression that might silently match nothing.Step 2: cross-reference against the Autopilot service record
The marker being absent tells you the Entra object has no registration stamp. It does not tell you whether the Autopilot service has a registration for that hardware. Those are two separate records, and comparing them is how you tell "never registered" apart from "registered but the marker landed somewhere else."
Step 3: ask the device, and know the limits of what it can answer
This is where a lot of published guidance goes wrong, so let me be precise. Microsoft does not document a ZTDID field anywhere on the device. The documented field list for dsregcmd /status covers device state, device details, tenant details, user state, SSO state, and diagnostics. It includes DeviceId, Thumbprint, TpmProtected, DeviceAuthStatus, and a long list of others. It does not include ZTDID, and it does not include physicalIds. If you are looking for the marker on the endpoint, you will not find it there.
What the device can tell you is whether it thinks it is Autopilot registered at all. Autopilot profile settings received from the deployment service are stored under one registry key.
| Value | What it tells you | Reading it for registration |
|---|---|---|
IsAutopilotDisabled | Set to 1 when the device is not registered with Autopilot. Can also mean the profile download failed on network or firewall grounds. | 1 is your strongest device-side signal that no registration exists. |
CloudAssignedTenantId | GUID of the Entra tenant the device registered with. Blank if the device is not registered with Autopilot. | Blank alongside IsAutopilotDisabled of 1 confirms the picture. |
CloudAssignedTenantDomain | The tenant domain the device registered with, for example contoso.onmicrosoft.com. Blank if not registered. | A populated value proves a profile was downloaded successfully. |
AadTenantId | GUID of the tenant the signing-in user belongs to. A mismatch against registration produces an error for the user. | Compare against CloudAssignedTenantId when a device registered in the wrong tenant. |
TenantMatched | Set to 1 when the user's tenant ID matches the tenant the device was registered with. If 0, the user sees an error and must start over. | 0 points at a cross-tenant registration, not a missing marker. |
CloudAssignedOobeConfig | A bitmap of which Autopilot OOBE settings were configured. Documented values are SkipCortanaOptIn 1, OobeUserNotLocalAdmin 2, SkipExpressSettings 4, SkipOemRegistration 8, SkipEula 16. | A populated bitmap means a real profile was applied. |
That combination is a textbook unregistered device. It has a tenant from the signed-in user, no assigned tenant from Autopilot, and the disable flag set.
Step 4: read the Autopilot event log
Autopilot writes to its own event log channel. If a device ever attempted an Autopilot flow and was told it was not registered, the evidence is here.
Event 807 is the one that matters here. It is the service telling the device, in plain terms, that it has no Autopilot registration. Here is the full documented catalog for that channel, so you can read the surrounding entries in context.
| Event ID | Type | What Microsoft documents |
|---|---|---|
| 100 | Warning | Autopilot policy not found. Typically temporary, while the device waits for a profile to download. |
| 101 | Info | AutopilotGetPolicyDwordByName succeeded. Autopilot retrieving and processing numeric OOBE settings. |
| 103 | Info | AutopilotGetPolicyStringByName succeeded. Processing OOBE setting strings such as the Entra tenant name. |
| 109 | Info | AutopilotGetOobeSettingsOverride succeeded. Processing state-related OOBE settings. |
| 111 | Info | AutopilotRetrieveSettings succeeded. Profile settings controlling OOBE behaviour were retrieved. |
| 153 | Info | State changed, usually ProfileState_Unknown to ProfileState_Available. A profile was downloaded and the device is ready to deploy. |
| 160 | Info | AutopilotRetrieveSettings beginning acquisition. Autopilot is preparing to download profile settings. |
| 161 | Info | Retrieve settings succeeded. The profile downloaded successfully. |
| 163 | Info | Download is not required, the device is already provisioned. A profile is present on the device. Sysprep /Generalize typically removes it. |
| 164 | Info | Internet is available to attempt policy download. |
| 171 | Error | Failed to set TPM identity confirmed. Indicates a TPM attestation problem, which self-deploying mode needs. |
| 172 | Error | Failed to set Autopilot profile as available. Typically related to event 171. |
| 807 | Error | ZtdDeviceIsNotRegistered. Validate the hardware hash is uploaded to Intune and the device is assigned a profile. |
| 809 | Error | ZtdDeviceHasNoAssignedProfile, assigned profile does not exist. The profile was deleted without cleanup. |
| 815 | Error | ZtdDeviceHasNoAssignedProfile, no profile assigned and no default profile in the tenant. |
| 908 | Error | SerialNumberMismatch or ProductKeyIdMismatch. Recorded values do not match the physical hardware. Reregister the device. |
The fix: repair the registration, not the rule
Once you know the marker is missing, resist the urge to loosen the dynamic group rule so the device slips in. The rule is not the problem. Work through these three things in order.
1. Confirm the dynamic group rule is Microsoft's rule, verbatim
Do this first, because it is fast, and because a mistyped rule produces the exact same symptom on every device instead of one.
- In the Microsoft Intune admin center, select Groups, then New group.
- For Group type, select Security.
- Enter a Group name and Group description.
- For Microsoft Entra roles can be assigned to the group, select No.
- For Membership type, select Dynamic Device.
- Select Owners, then choose the users who should own the group.
- Under Dynamic device members, select Add dynamic query, then Add expression.
- Switch to the rule syntax text box and paste the rule for all Autopilot devices exactly as Microsoft publishes it:
(device.devicePhysicalIDs -any (_ -startsWith "[ZTDid]")) - Select Save, then Create.
If you need to scope by group tag or purchase order instead, these are the two other documented rule strings:
- By group tag, which maps to
OrderID:(device.devicePhysicalIds -any (_ -eq "[OrderID]:179887111881")) - By purchase order:
(device.devicePhysicalIds -any (_ -eq "[PurchaseOrderId]:76222342342"))
2. Re-register the device so a fresh marker is stamped
If the rule is correct and one device is still missing, the registration itself needs repairing. Microsoft's documented remedy for a device whose Entra object predates its Autopilot registration is to delete all three records and start over.
- Sign in to the Microsoft Intune admin center and select Devices.
- Under By platform, select Windows.
- Find the device under Device name, open it, and note the Serial number.
- Select Delete in the toolbar, then Yes to confirm removing it from Intune.
- Under Device onboarding, select Enrollment, then under Windows Autopilot select Devices.
- Find the device by the serial number you noted, and select its checkbox.
- Open the overflow menu on that row. If Unassign user is available, select it and confirm with OK.
- With the device still selected, choose Delete in the toolbar, then Yes.
- Select Sync to speed up the deregistration, then Refresh every few minutes until the row disappears.
- Re-register the device by importing its hardware hash again, then re-enrol it.
3. For an already-managed fleet, register in bulk and wait the documented window
If your audit turns up a large batch of enrolled devices with no registration at all, the Autopilot profile carries a setting that registers them for you.
- Open the Autopilot deployment profile assigned to the group containing those devices.
- Set Convert all targeted devices to Autopilot to Yes.
- Save the profile, and allow 48 hours for the registration to be processed.
- Re-run your audit and confirm the marker has appeared on the Entra device objects.
Provisioning\Diagnostics\Autopilot is a diagnostic cache of what the service told the device, not a control surface.Proof it worked: the audit report goes quiet
The companion script for this post walks every Entra device object, extracts physicalIds, and compares what it finds against the Autopilot service's own registration list. It is read-only. Every Graph call is a GET, and the scopes are Device.Read.All and DeviceManagementServiceConfig.Read.All.
A healthy fleet is one where the first counter is high and the three warning counters are explained. You will almost never drive them to zero, and you should not try. Personal devices and Entra registered devices are legitimately not Autopilot devices, and they should legitimately have no marker. What you are hunting is the specific mismatch: a device the Autopilot service believes it has registered, whose Entra object carries no marker. Those are the machines that behave hand-built, and now you have a name for the reason.
References
Microsoft official documentation
- Create device groups for Windows Autopilot — the three documented dynamic device group rule strings for
[ZTDid],[OrderID], and[PurchaseOrderId], the group tag to OrderID mapping, and the 48 hour registration processing window. - Manage rules for dynamic membership groups in Microsoft Entra ID — the
devicePhysicalIdsdevice attribute, the operator list, the-anyand underscore syntax, case sensitivity rules, and the note that device rules can only be built in the text box. - device resource type (Microsoft Graph v1.0) — the
physicalIdsstring collection, its "for internal use only" label, and the$filteroperators it supports. - List devices (Microsoft Graph v1.0) —
Device.Read.Allas the least privileged permission, and the sample response showing an emptyphysicalIdscollection. - windowsAutopilotDeviceIdentity resource type — the Autopilot device identity properties, including
azureActiveDirectoryDeviceId,groupTag, andpurchaseOrderIdentifier. - List windowsAutopilotDeviceIdentities — the GET endpoint and the
DeviceManagementServiceConfig.Read.Allleast privileged scope. - Windows Autopilot registration overview — registration automatically creating the Microsoft Entra object, and what happens to that object after deregistration.
- Windows Autopilot troubleshooting FAQ — the
Provisioning\Diagnostics\Autopilotregistry values, theModernDeployment-Diagnostics-Providerevent channel and full Event ID catalog, and the Entra object as Autopilot's anchor. - Troubleshoot devices by using the dsregcmd command — the complete documented field list, which contains no ZTDID field.
- Automatic registration of existing devices — the documented caveats on Convert all targeted devices to Autopilot.
Community deep-dives
| Author | Article | Why it is worth reading |
|---|---|---|
| Rudy Ooms | Willy's White Glove Autopilot Wonderland | Walks the pre-provisioning flow and describes the Device Registration Service pre-creating the Entra object and attaching the ZTDID during registration. The clearest community explanation of where the marker comes from. |
| Mattias Melkersen, Rudy Ooms, Ben Whitmore (MSEndpointMgr) | Onboarding modern with Autopilot: Magic trick revealed | End to end trace of the Autopilot provisioning flow, including the devicePhysicalIDs query used to select Autopilot registered devices. |
| Rudy Ooms | Autopilot: The Group Membership War | Useful counterpoint before you conclude a marker is missing. Dynamic group membership processing can lag, so rule out delay before you rule out the ZTDID. |
Download it from Imran76Awan/Windows-Autopilot-Scripts — no sign-in required. It is read-only: it reports and never changes a device or anything in Intune. Validate it in your own environment before relying on the output.