Before you start

Check you are ready

Five checks before you install anything. Each one avoids a problem that is harder to fix once accounts are in the cloud.

15 minutesNo changes made on this page

The domain is verified

contoso.com shows as Verified in admin.microsoft.com › Settings › Domains.

Every account has the right sign-in name

Each user's UPN in AD must end in the verified domain. An account ending @ad.contoso.com arrives in Microsoft 365 as @contoso.onmicrosoft.com instead.

A domain controller
$base = "OU=CON-Users,OU=Contoso School,DC=ad,DC=contoso,DC=com"
Get-ADUser -SearchBase $base -Filter * -Properties mail, proxyAddresses |
  Select-Object SamAccountName, UserPrincipalName, mail | Format-Table -AutoSize
(Get-ADUser -SearchBase $base -Filter "UserPrincipalName -notlike '*@contoso.com'").Count    # must be 0

Admin accounts are outside the sync scope

You will sync CON-Users only. Make sure CON-Admins sits beside it, not inside it. The Active Directory OU guide shows how to move it.

The sync server can reach Microsoft

NeedsDetail
Operating systemWindows Server 2016 or later, joined to the domain
Memory4 GB
.NET Framework4.7.1 or later
OutboundTCP 443 and 80 to the internet. 80 is for certificate checks
To the DCsThe normal AD ports

Pick where it runs

Use a member server in CON-Infrastructure, such as CON-SYNC-01. A domain controller works too, but keeping the agent off the DCs keeps their job simple.

Done when

Check

The domain is verified, the UPN count is 0, CON-Admins is outside CON-Users, and the server can open https://login.microsoftonline.com.

Your progress is kept in this browser only.