I faced the same issue.
After Installing the Microsoft Online Services Sign-In Assistant for IT Professionals RTW as suggested by @Jesse Flintoff , the Wizard was workling longer but failed agin with the same Error Messge.
The Inspection of "C:\ProgramData\Microsoft\Windows Server\Logs\SharedServiceHost-EmailProviderServiceConfig.log" included an interesting entry:
[10700] 210516.175233.1008: General: Failed to open IDENTITY\BestPasswordPolicy registry key.
For me this looked like a premission Issue of a registry-key.
Then I Investigated the issue further and found out, that this message is related to the installation of the Password Change Notification Service (Short PCNS)
I Then decided to Install this Service manually as described here: https://learn.microsoft.com/en-us/microsoft-identity-manager/deploying-mim-password-change-notification-service-on-domain-controller
I issued the following commands in an elevated terminal and clicked trough de Wizards:
msiexec.exe /i "C:\Program Files\Windows Server\Bin\PCNS\Password Change Notification Service.msi" SCHEMAONLY=TRUE
msiexec.exe /i "C:\Program Files\Windows Server\Bin\PCNS\Password Change Notification Service.msi"
Then I rebooted the Server and was able to link my Windows Server 2016 Essentials to my Microsoft 365 Tenant.
In some cases the PCNS-Files seem to be missing. I uploaded the PCNS.zip file from my Server to my OneDrive: https://walkerit-my.sharepoint.com/:u:/g/personal/andreas_walker_walkerit_ch/EdibZSTue_dJqU4BnsLfTKoB8PlChoump1crJ1VVZkyd4A?e=QFMcmx