SAMaccountname or UPN?

Blackthorn 21 Reputation points
2026-04-17T13:15:00.9833333+00:00

We are moving 9,000 devices from SCCM to Intune co-management. Our users currently log in to Windows using their SAMAccountName, but our vendor claims we must switch to UPN (email) for devices to register in Entra ID.

We successfully tested SAMAccount logins on new VMs using a "silent registration" GPO, but it’s failing on our existing physical machines. Currently, registration only triggers if a user manually signs into an MS App with their UPN, which creates a major compliance gap. How did you handle user logins during your rollout?

I have numerous tickets open with MS hoping to gain answers, but nothing reliable has been presented.

Can you register and manage devices without users using UPN to sign in to windows?

Microsoft Security | Intune | Enrollment

1 answer

Sort by: Newest
  1. AI answer

    2026-04-17T13:15:21.18+00:00

    Devices can be registered and co-managed without users signing in to Windows with UPN, but the UPN behind the account must be valid and routable in Microsoft Entra ID, and the MDM/Intune scopes must be configured correctly. The Windows logon name format (SAMAccountName vs UPN-style) is not the deciding factor; the underlying user object’s UPN and Entra configuration are.

    From the enrollment side, a common failure pattern for auto-enrollment/co-management is:

    • Auto-enrollment task runs (GPO or co-management),
    • The user’s UPN in AD uses an unverified or non-routable suffix (for example, user@contoso.local),
    • Or the MDM user scope is set to None,
    • Result: auto-enrollment fails with errors like 0x8018002b.

    In that scenario, the fix is to correct the UPN and/or MDM scope, not to force users to log on with UPN instead of SAMAccountName.

    Key points from the documented behavior:

    1. UPN must be routable and verified
      • If the on-premises UPN uses a non-routable suffix (such as .local), it causes auto-enrollment failures.
      • The guidance is to change the UPN suffix in AD to a valid, verified domain (for example, contoso.com) on the user account. This can be done per-user or in bulk via Active Directory Users and Computers:
        • Open dsa.msc → locate user(s) → PropertiesAccount tab → change User logon name suffix to a valid UPN suffix (for example, contoso.com).
    2. MDM user scope must include the users
      • If MDM user scope is set to None, auto-enrollment fails even if the UPN is valid.
      • Ensure the MDM user scope in Intune/Entra is set to include the users (for example, “Some” or “All” users) that are expected to auto-enroll.
    3. How this relates to SAMAccountName vs UPN logon
      • Windows can still be logged into using DOMAIN\samaccountname while the underlying AD user object has a valid UPN (for example, ******@contoso.com).
      • The enrollment and Entra registration logic uses the UPN attribute from AD / Entra, not the exact string typed at the Windows logon screen.
      • Therefore, as long as the user object’s UPN is a verified, routable domain and MDM scope is correct, devices can register and be managed even if users continue to log on with SAMAccountName.
    4. When manual UPN sign-in to an app “fixes” it
      • The behavior where registration only occurs after a user signs into an MS app with UPN suggests that the background auto-enrollment path is failing (often due to UPN domain or MDM scope issues), and the interactive sign-in is providing the correct cloud identity and token.
      • Fixing the UPN suffix and MDM scope removes the dependency on that manual app sign-in.

    In practice, a rollout can keep SAMAccountName for Windows logon while:

    • Updating users’ UPN suffixes in AD to a verified, routable domain used in Entra ID, and
    • Ensuring MDM user scope is configured to include those users.

    This allows silent/automatic registration and co-management without forcing a change in how users log on to Windows.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.