Entra ID Connect: directory synchronization is enabled for this directory, but has not yet taken effect.
Directory synchronization is enabled for this directory but has not yet taken effect.
Today i created a new tenant and configured Entra ID connect sync. After a wait of approx more then 72 hours. In fact i waited more then 2 weeks. This error returned everytime i wanted to make a change to the Entra ID connect sync. See the error below. The fix for this you will find below.

Fix the error: Directory synchronization is enabled for this directory but, has not yet taken effect.
open powershell and connect to your tenant with Microsoft Graph.
Use the following commands in powershell: Install the right module
Install-Module -Name Microsoft.Graph
Connect to the tenant
Connect-MgGraph -Scopes 'OnPremDirectorySynchronization.ReadWrite.All', 'Organization.ReadWrite.All'
Login with your tenant admin account.
Use the following commands:
(get-mgorganization).OnPremisesSyncEnabled
(get-mgorganization).AdditionalProperties.onPremisesSyncStatus
You wil get results like:

Use the following commands to initiate the state form pendingEnabled to Enabled
$organizationId = (get-mgorganization).id
$params = @{
onPremisesSyncEnabled = $true
}
Update-MgOrganization -OrganizationId $organizationId -BodyParameter $params
The command looks like the following: you wil get no feedback. But use the following command to check the changes.

Use the following command to get the result settings:
Get-mgorganization | FL
You wil see that the OnpremissesSyncEnabled is set to true

Wait now for 24 hours, ou’re tenant was fixed in 12 hours. I can make sync changes again to the tenant through Entra ID connect.