...
Make sure to the user synchronization runs at a time where CXO is not used
Pause the agent service either programmatically or in the configurator
Stop them programmatically
Code Block Stop-Service -Name "CXO-Cockpit Agent" <run synchronizatiob> Start-Service -Name "CXO-Cockpit Agent"
Configurator > Configuration > Schedule.xml
Open the configurator
...