Views:

 

Disclaimer: This information is really old. Like pre-pandemic old, the before-before times. Microsoft has made a lot of improvements to the Windows OS since this material was pulled together. If your Windows device has a build older than 20H2, we strongly suggest that first you do a full upgrade to a recent build before moving forward with Hybrid Join, Intune, or MS365 subscription-based Windows 10 E3/E5 licenses.

If you need additional help after reviewing this material, please see our Support Page for info regarding how to contact us and schedule a consultation.

Summary Steps

These are Tom's notes from the field when trying to get Azure AD Join to work with machines that were already local AD joined to a domain where AD Connect is being used to sync accounts to the MS365 cloud.
 
The notes make references to our internal/lab domain controller (COLOSSUS) and some Liquid Mercury Staff (Bill Otremba). Where possible, these were highlighted for clarity. Note that some service accounts end in .local, but this doesn't mean the domain name ends in .local; it is just the name for the AD Sync account.

  1. Upgrade to the latest version of AD Connect
  2. Run the Initialize-ADSyncDomainJoinedComputerSync
  3. Confirm CN exists in Configuration schema

Detailed Walkthrough and Notes

    Windows PowerShell
    Copyright (C) 2014 Microsoft Corporation. All rights reserved.
     
    PS C:\Windows\system32> Import-Module "C:\Program Files\Microsoft Azure Active Directory Connect\AdPrep\AdSyncPrep.psm1"
     
    PS C:\Windows\system32> Initialize-ADSyncDomainJoinedComputerSync
     
    cmdlet Initialize-ADSyncDomainJoinedComputerSync at command pipeline position 1
    Supply values for the following parameters:
    AdConnectorAccount: COLOSSUS\adsync.local
    AzureADCredentials
    Initializing your Active Directory forest to sync Windows 10 domain joined computers to Azure AD.
    Configuration Complete
     
    10/1/2019 Bill says the wizard does this for you.
    https://docs.microsoft.com/en-us/azure/active-directory/devices/hybrid-azuread-join-managed-domains

     
    https://docs.microsoft.com/en-us/azure/active-directory/active-directory-conditional-access-automatic-device-registration-setup
    In elevated cmd prompt:
     

    Dsregcmd /status
     
    +----------------------------------------------------------------------+
    | Device State                                                         |
    +----------------------------------------------------------------------+
     
    AzureAdJoined : YES
    EnterpriseJoined : NO
    DeviceId : 028f190a-5024-406e-872d-1c6e7333ec8f
    Thumbprint : 27A9CAE1F0D18844D9F4B8733D16A6350A4B5
    KeyContainerId : e8f7ec32-2aa7-4825-8ce1-fec4c92a86a5
    KeyProvider : Microsoft Software Key Storage Provider
    TpmProtected : NO
    KeySignTest: : PASSED
    Idp : login.windows.net
    TenantId : f48e040a-d458-43a9-9f1c-4a0c9aad3b8b
    TenantName :
    AuthCodeUrl : https://login.microsoftonline.com/spliquidmercury.onmicrosoft.com/oauth2/authorize
    AccessTokenUrl : https://login.microsoftonline.com/spliquidmercury.onmicrosoft.com/oauth2/token
    MdmUrl :
    MdmTouUrl :
    MdmComplianceUrl :
    SettingsUrl :
    JoinSrvVersion : 1.0
    JoinSrvUrl : https://enterpriseregistration.windows.net/EnrollmentServer/device/
    JoinSrvId : urn:ms-drs:enterpriseregistration.windows.net
    KeySrvVersion : 1.0
    KeySrvUrl : https://enterpriseregistration.windows.net/EnrollmentServer/key/
    KeySrvId : urn:ms-drs:enterpriseregistration.windows.net
    DomainJoined : YES
    DomainName : COLOSSUS
     
    +----------------------------------------------------------------------+
    | User State                                                           |
    +----------------------------------------------------------------------+
     
    NgcSet : NO
    WorkplaceJoined : YES
    WorkplaceDeviceId : c64faf7c-7c38-44db-ae37-401abddc0b33
    WorkplaceThumbprint : 7EF8603783E5B78BCCF30E6EAFEAE3D56A9272
    WorkplaceIdp : login.windows.net
    WorkplaceTenantId : f48e040a-d458-43a9-9f1c-4a0c9aad3b8b
    WorkplaceTenantName : Liquid Mercury Solutions
    WorkplaceMdmUrl :
    WorkplaceSettingsUrl :
    WamDefaultSet : NO
    AzureAdPrt : NO
     
    +----------------------------------------------------------------------+
    | Ngc Prerequisite Check                                               |
    +----------------------------------------------------------------------+
     
    IsUserAzureAD : NO
    PolicyEnabled : NO
    DeviceEligible : YES
    SessionIsNotRemote : YES
    X509CertRequired : NO
    PreReqResult : WillNotProvision
     
    ocal Group Policy Editor <br>File Action View Help <br>Computer Configuration <br>Software Settings <br>Windows Settings <br>Administrative Templates <br>Control Panel <br>Network <br>Printers <br>server <br>Start Menu and Taskbar <br>System <br>System Center 2012 - Operations M <br>Windows Components <br>ActiveX Installer Service <br>Add features to Windows 10 <br>App Package Deployment <br>App Privacy <br>App runtime <br>Application Compatibility <br>AutoPlay Policies <br>Biometrics <br>BitLocker Drive Encryption <br>Camera <br>Cloud Content <br>Connect <br>Credential User Interface <br>Data Collection and Preview Bui <br>Delivery Optimization <br>Desktop Gadgets <br>Desktop Window Manager <br>Device and Driver Compatibility <br>Device Reaistration <br>•l setting(s) <br>x <br>Device Registration <br>Register domain joined computers <br>as devices <br>Edit egljcugttinc <br>Requirements: <br>At least Windows Server 2012 R2 or <br>Windows 8.1 <br>Description: <br>This setting lets you configure how <br>domain joined computers become <br>registered as devices. <br>When you enable this setting, <br>domain joined computers <br>automatically and silently get <br>registered as devices with Azure <br>Active Directory. <br>Note: Additional requirements may <br>apply on certain Windows SKUs. Refer <br>to Azure Active Directory De.'ice <br>Registration Overview. <br>http://go.microsoft.com/fwlink/? <br>Linkid=307136 <br>Setting <br>Register domain joined computers as devices <br>State <br>Enabled <br>Comment <br>Yes <br>Extended <br>Standard
     
    Eventually, after some time…
     
    IsUserAzureAD : YES
    PolicyEnabled : NO
    DeviceEligible : YES
    SessionIsNotRemote : YES
    X509CertRequired : NO
    PreReqResult : WillNotProvision
     
    But, why does the PC still claim the policy is not enabled??
     
    Note that at this time, my Azure AD Account is no longer shown in Settings > Accounts. More so, if I try to add one, I will get an error at this stage (What error? Tom never mentions it. Sorry.)
     

     
    My credentials are now shown under Email and App Accounts.
    https://connect.microsoft.com/site1164/content/content.aspx?ContentID=32016
    http://connect.microsoft.com/site1164/Downloads/DownloadDetails.aspx?DownloadID=59185
     
    I have this working on my test PC now – though I am not 100% sure exactly what was the magic button that makes it work.

    • Fussed around with Intune client for a while, uninstalled and re-installed the Intune Agent without any success. Very frustrating experience and lots of online chatter about conflicts between Windows 10 MDM and Intune makes me think these aren’t fully baked together yet.
    • Applied all the latest updates to the PC from Intune management console. Maybe this helped, but I was not missing many updates.
    • Ensure users are allowed to Azure AD Join devices:
    • gome <br>Devices - Device settings <br>A' dui«s <br>State <br>logs <br>use'S join duiCUto AD O <br>member <br>administratoß AD deviæs O <br>o <br>Len this settima <br>Require Multi-factor Auth to join O <br>number per user O <br>Enterprise State Roaming <br>Ent«pri" State Roaming settings
    • Changes Sync Your Settings option in Azure AD (Classic Management Portal) so it was enabled. I cannot find this setting in the new Azure Portal at all. (I believe this now shows up in Azure AD > Devices > Device Settings) We can certainly enable this in any tenant easily.
      Note Bill says "don't turn this on":
    • Home > - Stile aming <br>Devices - Enterprise State Roaming <br>users and app data across O <br>0 <br>All devices <br>Enterpri" St*e
    • On the domain controller, admin policy templates from Win 10 1607 were missing in Windows 2012 R2. Download them here. TODO - does this apply if DC is Windows 2016?
    • https://www.microsoft.com/en-us/download/confirmation.aspx?id=53430
    • Instructions on how to unpack it to work, in short copy them from install location to SYSVOL subfolder: https://www.niallbrady.com/2016/02/03/how-can-i-add-new-windows-10-admx-files-to-the-group-policy-central-store-and-then-deploy-them/
    • Changed group policy settings to enable Device Registration, Windows Hello, and Sync Your Settings. Note that in Windows 8 is was called “Workplace Join” in 10 it is called “Device Registration”.
    • Added enterpriseregistration and enterpriseenrollment to local AD DNS server.

    enterpriseenrollrnent <br>n <br>enterpriseregistration <br>Alias (CNAME) <br>Alias (CNAME) <br>enterpriseenrollrnent.manage.microsoft.com. <br>enterpriseregistration.windows.net. <br>static <br>static

    • Also enabled domain services in Azure AD, so it can function as an LDAP server now. Note: this requires an Azure AD Premium plan, but Azure AD DS is now also an option for $150/mo.
    • I moved the computer records in AD to an OU that is synced with Azure AD, because we have filtering enabled in our AD Connect so that not 100% of records will sync.
    • Did another GPUPDATE /FORCE on the client. Was forced to logout, had to create a PIN which required MFA (these are configured in Hello under GPO). Note that next time that you log in, it will default to PIN but you can switch back to password login.
    • Now, "dsregcmd /status" no longer has the NGC prerequisite check section at all. Seems to be fully joined in both AD and AAD. (Note, Get-MsolDevice still doesn't report the device having a "registered owner" but there seems to be no ill effect.) TODO - are additional commands needed to assign one?

    +----------------------------------------------------------------------+
    | Device State                                                         |
    +----------------------------------------------------------------------+
     
    AzureAdJoined : YES
    EnterpriseJoined : NO
    DeviceId : 028f190a-5024-406e-872d-1c6e7333ec8f
    Thumbprint : 27A9CAE1F0D18844D9F4B8733D16A6350A4B5
    KeyContainerId : e8f7ec32-2aa7-4825-8ce1-fec4c92a86a5
    KeyProvider : Microsoft Software Key Storage Provider
    TpmProtected : NO
    KeySignTest: : PASSED
    Idp : login.windows.net
    TenantId : f48e040a-d458-43a9-9f1c-4a0c9aad3b8b
    TenantName : Liquid Mercury - SharePoint+Office 365+Azure
    AuthCodeUrl : https://login.microsoftonline.com/spliquidmercury.onmicrosoft.com/oauth2/authorize
    AccessTokenUrl : https://login.microsoftonline.com/spliquidmercury.onmicrosoft.com/oauth2/token
    MdmUrl :
    MdmTouUrl :
    MdmComplianceUrl :
    SettingsUrl :
    JoinSrvVersion : 1.0
    JoinSrvUrl : https://enterpriseregistration.windows.net/EnrollmentServer/device/
    JoinSrvId : urn:ms-drs:enterpriseregistration.windows.net
    KeySrvVersion : 1.0
    KeySrvUrl : https://enterpriseregistration.windows.net/EnrollmentServer/key/
    KeySrvId : urn:ms-drs:enterpriseregistration.windows.net
    DomainJoined : YES
    DomainName : COLOSSUS
     
    +----------------------------------------------------------------------+
    | User State                                                           |
    +----------------------------------------------------------------------+
     
    NgcSet : YES
    NgcKeyId : {E8E52F45-B7B9-4514-B823-20B2A3274035}
    WorkplaceJoined : YES
    WorkplaceDeviceId : c64faf7c-7c38-44db-ae37-401abddc0b33
    WorkplaceThumbprint : 7EF8603783E5B78BCCF30E6EAFEAE3D56A9272
    WorkplaceIdp : login.windows.net
    WorkplaceTenantId : f48e040a-d458-43a9-9f1c-4a0c9aad3b8b
    WorkplaceTenantName : Liquid Mercury Solutions
    WorkplaceMdmUrl :
    WorkplaceSettingsUrl :
    WamDefaultSet : YES
    WamDefaultAuthority : organizations
    WamDefaultId : https://login.microsoft.com
    WamDefaultGUID : {B16898C6-A148-4967-9171-64D755DA8520} (AzureAd)
    AzureAdPrt : YES
     

    Additional Resources

    Hybrid Azure AD <br>Joined Step by <br>Step