I an having an issue with directory sync in the API gateway which I can not find a resolution for.

API is installed and mail flow is fine.
DIR sync produces the following errors

Event ID 511 Error {Session failed}: The application failed while processing.
Event ID 514 A RESTART request has been received.

If I cnage the services to run as an admin user in the domain the dir sync works fine but this is not a solution as it brakes the mailflow as it can not longer connect to the READYOUT/IN folders.