HomeNewsletterCommunityMVP FeedToolsArchiveBlogToday's NewsAboutServicesQuick Links Subscribe free
← Back to Blog
Autopilot Windows AutopilotIntuneMicrosoft GraphEntra IDDevice EnrollmentPowerShell

Assign User Does Not Lock the Device: What Autopilot AssignedUser Really Does

IA
Imran Awan
21 August 2026

A new laptop is registered for Windows Autopilot. You open the Windows Autopilot devices blade, tick the row, and select Assign user. You pick the new starter. You type a friendly name. You save. The device now looks like it belongs to that person.

Then the courier delivers it to the wrong desk. Somebody else opens the box, connects to Wi-Fi, signs in with their own work account, and walks away with a fully provisioned corporate laptop. The Autopilot record still names the person you assigned. The Intune record names the person who actually signed in. Nothing failed, nothing alerted, and nothing was misconfigured.

The short version

Assigning a user to an Autopilot device writes two strings onto a cloud object: userPrincipalName and addressableUserName. Microsoft documents the purpose of that assignment as applying the assigned user's policies and application installs during the Autopilot process. Microsoft documents exactly one place where the username is actually enforced at the sign-in prompt, and it documents the exception in the same breath. With a cloud-native Microsoft Entra account in user-driven Microsoft Entra join the username is enforced, but when Active Directory Federation Services is in use it is not, and a different user can sign in. The Intune primary user is set from whoever enrolled the device, not from whoever you assigned, so the two records can disagree silently. The companion script reads both and reports every disagreement.

The problem: an assignment that reads like a lock

The wording in the portal invites the wrong conclusion. The toolbar button says Assign user. The resulting property is labelled User. The blade even offers Unassign user from the row menu. Every one of those words implies ownership, and ownership implies exclusion.

It helps to separate two questions that admins tend to merge into one. The first question is what the assignment configures. The second question is what the assignment prevents. Microsoft answers the first question clearly and repeatedly. It answers the second question in exactly one place, and the answer is narrower than most people expect.

Here is what the assignment configures, quoted from the user-driven Microsoft Entra join tutorial: "If a Windows Autopilot device is assigned to a user, then any user policies and application installs assigned to that user is applied to the device during the Windows Autopilot process." The same sentence appears verbatim in the hybrid join tutorial and in both pre-provisioning tutorials.

Read that again. It is a statement about policy scope. It describes which configuration is pulled forward into the provisioning window. It says nothing at all about who is permitted to complete the out-of-box experience, or OOBE.

Context: Microsoft's own analogy is instructive. The tutorials add a tip for Configuration Manager admins: "assigning a user to a device is similar to user device affinity in Configuration Manager." User device affinity was never an access control. It was a targeting mechanism, and so is this.

The practical consequence is that three separate records can name three different things after a deployment. The Autopilot device identity holds the user you assigned. The Intune managed device holds the user who actually enrolled. The Microsoft Entra device object holds an owner set during registration. Nothing in the admin center puts those three side by side, so a mismatch can sit in a tenant for years.

Why it happens: two strings on a cloud object

Every Autopilot device is represented in Microsoft Graph as a windowsAutopilotDeviceIdentity. Assigning a user is the assignUserToDevice action against that object. The action takes exactly two parameters, and both of them are plain strings.

PropertyTypeWhat Microsoft documents it as
userPrincipalNameString"User Principal Name." This is the assigned user, and one of the two parameters accepted by assignUserToDevice.
addressableUserNameString"Addressable user name." The second assignUserToDevice parameter. This is the property behind the User friendly name field in the portal blade.
managedDeviceIdString"Managed Device ID." The link to the Intune managed device, populated after enrolment. This is the join key an audit needs.
enrollmentStateenrollmentState"Intune enrollment state of the Windows autopilot device." Documented values are unknown, enrolled, pendingReset, failed and notContacted.
groupTagString"Group Tag of the Windows autopilot device." The property most deployments should actually be using to drive targeting.
displayNameString"Display Name." The device name, editable in the blade. Microsoft notes device names are ignored in hybrid Microsoft Entra deployments.

Notice what is missing from that list. There is no boolean like an enforce-assigned-user flag. There is no restriction object, no allowed-users collection, no scope. The entire feature surface is two strings, plus whatever behaviour the service chooses to attach to them.

Where enforcement is documented, and where it is not

Microsoft does document username enforcement in one specific case. It appears on the Windows Autopilot known issues page, under a heading that names the exception rather than the rule: "A non-assigned user can sign in when using user-driven mode with Active Directory Federation Services (ADFS)."

The body of that entry is the most important paragraph on this whole topic. Microsoft states that in a user-driven Microsoft Entra joined environment, if the assigned user is a cloud-native Microsoft Entra account, the username is enforced and the user is only asked for their password, with no way to sign in with another user ID. It then states that when ADFS is used, the username assignment is not enforced, and a different user than the one assigned can sign in on the device.

So the honest answer is not "it never restricts anything." The honest answer is more specific, and more awkward. Enforcement is documented for one join type, one deployment mode, and one account type. Microsoft describes it inside a known-issues article, in the course of explaining the case where it breaks. That reads as a behaviour of the sign-in experience, not a stated security guarantee. Microsoft nowhere describes it as an authorization boundary.

Gotcha: The user-driven mode article carries this as an Important note: "If Active Directory Federation Services (ADFS) is being used, there's a known issue that can enable the end user to sign in with a different account than the one assigned to that device." If your tenant is federated, treat the assigned user purely as a convenience. Do not build a process on it.

Equally important is what Microsoft does not say. There is no equivalent enforcement statement for Microsoft Entra hybrid join, even though the hybrid tutorial offers the same Assign user step with identical wording. There is no enforcement statement for the user flow of a pre-provisioned deployment. And self-deploying mode does not use an assigned user at all. Microsoft states the device either remains at the sign-on screen, "where any member of the organization can sign in by specifying their Microsoft Entra credentials," or automatically signs in as a local account.

Windows Autopilot device preparation, the newer profile experience, sidesteps the concept entirely. It requires that the device is not registered as an Autopilot device, and drives configuration through enrollment time grouping rather than a per-device user assignment.

The validation gap on import

The assignment can also be set at import time, by adding an Assigned User column after the Hardware Hash column in the registration file of comma-separated values, or CSV. The documented header format is a single line.

Device Serial Number,Windows Product ID,Hardware Hash,Group Tag,Assigned User

Microsoft is unusually direct about how little checking happens here. The documentation states that during upload of a CSV file, the only validation Microsoft performs on the Assigned User column is to check that the domain name is valid. It goes on to say that Microsoft does not perform individual UPN validation to ensure that an existing or correct user is being assigned.

Watch out: Microsoft warns that if an invalid UPN or incorrect username is uploaded, "the device might be inaccessible until the invalid assignment is removed." A typo in a bulk import can therefore break the out-of-box experience on a device you have already shipped. This is the one case where the assignment genuinely does block people, and it blocks the wrong ones.

That warning is the clearest evidence of what the feature really is. A field that can lock everybody out when it is wrong, but cannot reliably lock the wrong person out when it is right, is a pre-fill mechanism with a sharp edge. It is not an access control.

Nothing lands on the device

It also helps to see where the assignment does not appear. Microsoft documents the on-device registry location that holds the Autopilot profile settings received from the deployment service. The assigned user is not one of the values there.

HKLM\SOFTWARE\Microsoft\Provisioning\Diagnostics\Autopilot
ValueWhat Microsoft documents it asBearing on the assigned user
AadTenantIdGUID of the Microsoft Entra tenant the user signed into. The user receives an error if it does not match the tenant used to register the device.Tenant level only. Says nothing about which user.
CloudAssignedTenantDomainThe tenant the device is registered with. Blank if the device is not registered with Autopilot.Tenant level only.
CloudAssignedTenantIdGUID of the tenant the device registered with, corresponding to the domain above.Tenant level only.
IsAutopilotDisabledSet to 1 when the device is not registered with Autopilot, or the profile could not be downloaded.Registration state, not user state.
TenantMatchedSet to 1 if the user's tenant ID matches the tenant the device was registered with. If 0, the user is shown an error and forced to start over.This is the real client-side gate, and it is per tenant, not per user.
CloudAssignedOobeConfigA bitmap of configured Autopilot settings. Documented values are SkipCortanaOptIn = 1, OobeUserNotLocalAdmin = 2, SkipExpressSettings = 4, SkipOemRegistration = 8 and SkipEula = 16.No bit is documented for an assigned user.
Registry Editor
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Provisioning\Diagnostics\Autopilot
CloudAssignedTenantDomain   REG_SZ   contoso.onmicrosoft.com
CloudAssignedTenantId   REG_SZ   {aaaaaaaa-0b0b-1c1c-2d2d-333333333333}
IsAutopilotDisabled   REG_DWORD   0x00000000 (0)
TenantMatched   REG_DWORD   0x00000001 (1)
No value here names the assigned user. Illustrative view.

How to verify: read the assignment and the primary user side by side

Verification means reading two records and comparing them. Start with the assignment itself, in the Autopilot devices blade.

intune.microsoft.comDevices › WindowsEnrollmentWindows Autopilot › Devices

Selecting a device opens its property pane. Microsoft documents that the assigned user is listed under User and User friendly name. Now read the other half, on the enrolled device record.

intune.microsoft.comDevices › All devicespick a Windows deviceOverview (primary user)

This is where the two records diverge. Microsoft's table of how the primary user gets populated is explicit. For a Windows device enrolled through the Microsoft Entra join Autopilot out-of-box experience, the primary user assigned is the enrolling user, and it is assigned during enrollment. For Autopilot self-deploying mode, the primary user is None.

The assigned user is not in that table at all. The primary user comes from whoever authenticated, full stop.

Tip: Two more documented details make the audit easier. First, an Autopilot device only appears in the Windows devices list once registration has succeeded and a licensed user has signed in on the device. A device present in one list but not the other therefore tells you exactly which stage it reached. Second, Microsoft notes that updates to the primary user across Intune and Microsoft Entra ID can take up to ten minutes to appear, so do not judge a fresh deployment too quickly.

Doing this by hand does not scale past a handful of devices, and the blade has a documented filtering bug. Microsoft's known issues page says that viewing Autopilot devices in Intune "might not work as expected if attempting to filter results," and recommends using the Graph API to properly query and filter devices instead. So go to Graph.

PowerShell — read-only Graph query
Connect-MgGraph -Scopes 'DeviceManagementServiceConfig.Read.All','DeviceManagementManagedDevices.Read.All' # Least privilege. Read.All is enough to LIST Autopilot device identities. # The assignUserToDevice action needs ReadWrite.All - not wanted here. $ap = Invoke-MgGraphRequest -Method GET -Uri 'https://graph.microsoft.com/v1.0/deviceManagement/windowsAutopilotDeviceIdentities' $ap.value | Select-Object serialNumber, userPrincipalName, addressableUserName, managedDeviceId, enrollmentState, groupTag # userPrincipalName populated plus enrollmentState 'enrolled' means the # device deployed. It does NOT mean the assigned person deployed it. # managedDeviceId stays empty until a licensed user signs in on the device.

What the event log will and will not tell you

Autopilot writes its own event log, and it is worth knowing what is in there before you go hunting for an assigned-user event. Microsoft documents the channel as follows.

Application and Services Logs > Microsoft > Windows > ModernDeployment-Diagnostics-Provider > Autopilot
Event IDTypeDocumented message and meaning
100WarningAutopilot policy not found. Typically temporary, while the device waits for a profile download.
101InfoAutopilotGetPolicyDwordByName succeeded. Autopilot retrieving and processing numeric OOBE settings.
103InfoAutopilotGetPolicyStringByName succeeded. Processing OOBE setting strings such as the tenant name.
109InfoAutopilotGetOobeSettingsOverride succeeded. Processing state-related OOBE settings.
111InfoAutopilotRetrieveSettings succeeded. Profile settings controlling OOBE behaviour were retrieved.
153InfoAutopilotManager reported the state changed. Usually ProfileState_Unknown to ProfileState_Available.
160InfoAutopilotRetrieveSettings beginning acquisition. Preparing to download profile settings.
161InfoAutopilotManager retrieve settings succeeded. The profile downloaded successfully.
163InfoAutopilotManager determined download is not required and the device is already provisioned.
164InfoAutopilotManager determined Internet is available to attempt policy download.
171ErrorAutopilotManager failed to set TPM identity confirmed. Indicates a TPM attestation problem.
172ErrorAutopilotManager failed to set Autopilot profile as available. Typically related to 171.
807ErrorZtdDeviceIsNotRegistered. Validate the hardware hash upload and the profile assignment.
809ErrorZtdDeviceHasNoAssignedProfile. The assigned profile does not exist.
815ErrorZtdDeviceHasNoAssignedProfile. No profile assigned to the device and no default profile in the tenant.
908ErrorSerialNumberMismatch or ProductKeyIdMismatch. The hardware does not match the Autopilot record.

Read down that list and note the pattern. Events 809 and 815 concern the assigned profile. Not one documented event ID reports the assigned user, and none records a comparison between the assigned user and whoever signed in. There is no client-side audit trail for this, which is exactly why the audit has to happen in Graph.

Event Viewer — ModernDeployment-Diagnostics-Provider > Autopilot (illustrative)
LevelIDMessage
Warning100Autopilot policy not found
Information160AutopilotRetrieveSettings beginning acquisition
Information161AutopilotManager retrieve settings succeeded
Information153State changed ProfileState_Unknown to ProfileState_Available
Error807ZtdDeviceIsNotRegistered

The fix: use the assignment for what it is, and restrict elsewhere

There are two halves to this. Set the assignment correctly, because it does real work on policy scope. Then stop relying on it for anything security related.

Setting and clearing the assignment

Microsoft's documented click path for assigning a user runs as follows.

  1. Sign in to the Microsoft Intune admin center.
  2. In the Home screen, select Devices in the left hand pane.
  3. In Devices | Overview, under By platform, select Windows.
  4. In Windows | Windows devices, under Device onboarding, select Enrollment.
  5. In Windows | Windows enrollment, under Windows Autopilot, select Devices.
  6. Locate the device, tick the box to its left, then select Assign user in the toolbar.
  7. In the Select user window, find and select the user, then select Select. Microsoft notes the selected user must be licensed to use Intune.
  8. In the property pane, check the User friendly name value, adjust it if required, then select Save.

Clearing it happens from the row menu rather than the toolbar, which is easy to miss.

  1. In the Windows Autopilot devices screen, select the device by ticking its checkbox.
  2. Select the extended menu icon at the far right of the device row.
  3. Select Unassign user. Microsoft notes this option is greyed out when there is no assignment to remove.
  4. Confirm the warning dialog with OK.

Correcting the primary user is a separate action against a separate object.

  1. Sign in to the Microsoft Intune admin center.
  2. Select Devices, then All devices, then choose a Windows device.
  3. Select Properties, then Change primary user.
  4. Select the new user and choose Select.

Microsoft documents the constraints on that last one. It is supported on Windows devices only, and only on devices that are Microsoft Entra joined or Microsoft Entra hybrid joined, not on devices that are only Microsoft Entra registered. The user must be licensed for Intune. It requires the Managed devices/Set primary user permission. It does not change local group membership, and it does not change the "Enrolled by" user.

Gotcha: The Autopilot user assignment is a property of a cloud service object. There is no Group Policy setting and no configuration service provider, or CSP, equivalent, because there is nothing to configure on the client. If you are searching for an ADMX template or an OMA-URI that hardens this behaviour, there is not one to find. It is the portal, a CSV import, or the Graph action, and nothing else.

What actually restricts who can set a device up

If the requirement is genuinely "only this person may provision this device," then the assigned user is the wrong control. These are the documented mechanisms that do constrain the deployment.

ControlWhat it constrainsWhere it lives
Tenant matchThe one client-side user gate Microsoft documents. If the signing user's tenant does not match the tenant the device was registered with, TenantMatched is 0 and the user is shown an error and forced to start over.Automatic, per tenant
Microsoft Entra device settingsWhich users may join devices to Microsoft Entra ID at all. User-driven mode requires the enrolling user to hold that right.Microsoft Entra ID device settings
Intune enrollment restrictionsWhether a given group of users may enrol Windows MDM devices, and how many. Microsoft documents a block here as one cause of error 0x80180014.Devices > Enrollment > Device platform restriction
LicensingAn unlicensed user cannot complete enrolment. Microsoft attributes the MDM terms of use error to exactly this.Microsoft Entra ID, per user
Group tag and device groupsWhich Autopilot profile and which device-targeted policy a device receives, independent of who signs in.Autopilot device record and dynamic groups
Conditional AccessAccess decisions after enrolment. Note the documented requirement to exclude the Intune Enrollment app from Terms of Use policies.Microsoft Entra ID
Tip: Drive provisioning from the group tag wherever you can. The group tag is a documented property on the Autopilot device object, it feeds dynamic device groups, it does not depend on which human authenticates, and getting it wrong cannot render a device inaccessible. Keep the user assignment for the job Microsoft says it does, which is pulling user-targeted apps and policy into the provisioning window.

Proof it worked: mismatches before and after

The companion script reads both collections and joins them. It resolves each Autopilot record to its Intune device by managedDeviceId first, then by serial number as a fallback, and classifies the result.

PowerShell — Get-AutopilotAssignedUserReport.ps1 (illustrative output, not a real tenant)
PS> .\Get-AutopilotAssignedUserReport.ps1 -OnlyProblems ============================================================================== Autopilot assigned-user vs Intune primary user audit (read only) ============================================================================== This script issues GET requests only. It changes nothing in the tenant. Signed in to tenant : {aaaaaaaa-0b0b-1c1c-2d2d-333333333333} Granted scopes : DeviceManagementServiceConfig.Read.All, DeviceManagementManagedDevices.Read.All Read 412 record(s) from windowsAutopilotDeviceIdentities (5 page(s)) Read 388 record(s) from managedDevices (4 page(s)) ============================================================================== Summary by state ============================================================================== Mismatch 7 NoPrimaryUser 3 NoAssignedUser 61 Unresolved 1 NotYetEnrolled 24 Match 316 TOTAL 412 # Mismatch is the interesting row. Seven devices were set up by somebody # other than the person named on the Autopilot record. State SerialNumber AssignedUser PrimaryUser EnrollmentState ----- ------------ ------------ ----------- --------------- Mismatch SN-AAAA-0001 user-a user-b enrolled Mismatch SN-AAAA-0002 user-c user-d enrolled Unresolved SN-AAAA-0003 user-e (none) enrolled # Unresolved means the Autopilot record names a managedDeviceId that is no # longer present in managedDevices - look for a partial deregistration.

Treat a Mismatch as an inventory and allocation finding, not a security incident. It means the wrong person unboxed the device, and the assignment did not stop them because it was never designed to. The remediation is to correct the primary user, and to stop treating the assignment as an allocation guarantee.

PowerShell — the same audit after correcting the primary users (illustrative)
PS> .\Get-AutopilotAssignedUserReport.ps1 -OnlyProblems Mismatch 0 NoPrimaryUser 3 NoAssignedUser 61 Unresolved 0 NotYetEnrolled 24 Match 323 TOTAL 412 # NoPrimaryUser stayed at 3. Confirm those three are self-deploying mode, # where Microsoft documents that no primary user is configured. If they # are user-driven devices instead, that is a real finding. # NoAssignedUser at 61 is fine if you target by group tag, as you should.

The script fails loudly rather than quietly. If either Graph call errors, if a required scope was not granted, or if the Autopilot collection comes back empty, it aborts with exit code 1 instead of printing a summary. An empty result caused by a scoped-away read looks identical to a healthy tenant, and that is the one output an audit script must never produce.

References

SourceWhat it establishes
Assign Windows Autopilot device to a user (user-driven Microsoft Entra join)The documented purpose of the assignment, the full click path, the User friendly name field, and the CSV column.
Windows Autopilot known issuesThe only documented statement on username enforcement, the ADFS exception, and the Autopilot devices filtering bug.
Windows Autopilot user-driven modeThe user-driven process flow and the Important note about ADFS allowing a different account to sign in.
Manually register devices with Windows AutopilotThe CSV header format, and that only the domain name of the Assigned User column is validated.
Find the primary user of an Intune deviceThat the Autopilot out-of-box experience sets the primary user to the enrolling user, plus the constraints on changing it.
windowsAutopilotDeviceIdentity resource typeThe complete property list, confirming there is no enforcement property.
assignUserToDevice actionThe two parameters the action accepts, and that it requires DeviceManagementServiceConfig.ReadWrite.All.
List windowsAutopilotDeviceIdentitiesThat a read-only audit needs only DeviceManagementServiceConfig.Read.All.
Windows Autopilot troubleshooting FAQThe event log channel, the event ID catalog, and the documented registry values under Provisioning\Diagnostics\Autopilot.
Windows Autopilot self-deploying modeThat any member of the organization can sign in, and that no primary user is configured.
Windows Autopilot registration overviewThe Unassign user row menu action, and that a device joins the Windows devices list only after a licensed user signs in.
Windows Autopilot device preparation overviewThat device preparation requires the device is not registered for Autopilot, and uses enrollment time grouping instead.

Community deep dive

AuthorPostWhy it is relevant
Peter van der WoudeAssign a user to a Windows AutoPilot deviceWalks the assignment end to end, describes the behaviour as pre-filling the username and adding a custom greeting name during Windows setup, and flags that the experience does not work in combination with ADFS.

One closing thought on wording, because wording is what caused this. The button says Assign user, and assignment in most IT contexts implies exclusivity. In Autopilot it means what user device affinity meant in Configuration Manager: this is the person whose apps and policy we should bring along. Anyone who can authenticate to your tenant, join a device to Microsoft Entra ID, and enrol in Intune can still finish the job. If that set of people is larger than you are comfortable with, the answer lives in your Entra device settings and your enrollment restrictions, not in a text field on a device record.

PowerShell — companion script

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.

Get-AutopilotAssignedUserReport.ps1 — Read-only audit of Windows Autopilot assigned-user state, compared against the
View all scripts on GitHub
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
Who Owns the Device After Autopilot: Primary User, Device…
Intune sets a device primary user from whoever completed OOBE. That drives Company…
Autopilot
Enrollment Configuration Priority: Why Your Second ESP Profile…
Device configuration profiles merge. Device enrollment configurations do not. Exactly one…