Dirsync errors nad solutions: Event ID 0: Invalid namespace while automatic Sync or Start-OnlineCoexistenceSync, Object not found on the server

I have been facing errors with one of my customers lately. There is hybrid deployment with Exchange on premise and Office 365 with ADFS.


  • Dirsync stopped to work, because automatic synchronization started to throw invalid namespace errors (Event ID 0)
  • DirSync cannot be run via Start-OnlineCoexistenceSync
  • Dirsync could run manually from GUI

invalid namespace


When DirSync is installed on the server, after its configuration DirSync installator creates a service, which by default run synchronization every 3 hours to populate changes of local AD´s objects to the cloud and if Hybrid deplouyment checkbox is ticked during configuration, it also updates few attributes in opposite direction (From Cloud -> On premise).

Behind the scenes this service also creates performance counters to WMI and this is also the problem! In my case CCM agent´s (installed by SCCM) old version has been uninstalled and during uninstallation of CCM agent the repository of WMI has been corrupted. This caused the FIM Synchronization service to fail to run.


The solution is not easy and here are the steps need to be run in the following order to make it work and make it work permanenty:

  • Fix MOF files – MOF files are used to register performance counters to WMI. These files can be registered once per product installation or everytime the product upgrades and this is problem. Dirsync Product has by default MOF files, which are registered only once and not during upgrades. This problems come up when CCM agent is uninstalled and MOF files are not re-registered. To prevent this to happen again add the following text to the first line of MOF files for dirsync product:

MOF file location:
%Program Files%\Windows Azure Active Directory Sync\SYNCBUS\Synchronization Service\Bin

MOF files name:

mmswmi-x.mof is used for product uninstallation. Do not change it.

//*                                                      *
//*   Copyright (C) Microsoft. All rights reserved.      *
//*                                                      *
// mmswmi.MOF

  • Repair WMI repository permanently

To repair WMI you must run the following command from the same location as previous step and restart FIM Synchronization service. The result should be “Done!”

mofcomp mmswmi.mof
  • Re-Register FIM Sync Service DLL and restart win management service

From the same location under elevated permissions run:

regsvr32 /s mmswmi.dll
net stop winmgmt
net start winmgmt
  • Re-Run configuration of DirSync

From the location %Program Files%\Windows Azure Active Directory Sync run ConfigWizard.exe

If you receive the following error, move service accounts (MSOL* to OU=Users in root domain of your Onpremise AD)

No object on server

11 thoughts on “Dirsync errors nad solutions: Event ID 0: Invalid namespace while automatic Sync or Start-OnlineCoexistenceSync, Object not found on the server

  1. Excellent post. Got this error on a freshly installed DirSync instance, after a reboot of the server it failed. Interestingly enough, i had NOT installed ConfigMgr on the box.
    Anyhow, after following these steps the errors were fixed.

  2. This is exactly what is happening at our organization. I will know by tomorrow if it works but seems likely. Thanks so much for this, great post.

  3. After repeatedly having to fix this via complete uninstall/reinstall of DirSync, I’m thrilled to have found your post! This fixed it for us and hopefully will prevent us having to constantly repeat the processes with each SCEP client update!

  4. You absolutely ROCK! I installed an App that installed .Net 3.0. I think that was the culprit. Repairing .Net 4.0 did not help, but your repair worked perfectly.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s