Dynamics CRM integration not syncing contacts bi-directional

Your software
My Mautic version is: 2.16.0
My PHP version is: 7.2.24

Your problem
My problem is: The Dynamics CRM integration is not pulling contacts from Dynamics, while companies are being pulled from Dynamics. Pushing contacts works, but it will also create a contact when a contact with the same email already exists in Dynamics.

These errors are showing in the log: No errors are shown, it just doenst see new contacts in Dynamics and says there are none. If I map the Contact ID field to the any of the Dynamics contact fields, it produces this error, but that might be unrelated:

[2020-04-14 15:32:19] mautic.ERROR: SCHEMA ERROR: An exception occurred while executing 'SELECT f.alias, f.is_unique_identifer as is_unique, f.type, f.object FROM mtlead_fields f WHERE f.object = 'lead' ORDER BY f.field_order ASC': SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mauticdb.mtlead_fields' doesn't exist [] []

Steps I have tried to fix the problem: Tried a clean install of both Mautic and Dynamics. Tested if the issue was triggered by mismatching base languages (read somewhere they both have to be in English). Tried database upgrades and migrations. No luck so far.

Perhaps this is an obvious question, but have you configured the integration per the documentation here:


and the field mapping part here:


and followed these steps for testing:


(Genuine question - the docs might need updating if there is missing information)

Haha, there are no bad questions, thanks for the response :slight_smile:

I did follow these instructions. The docs are not really up to date on the Dynamics/Azure Active Directory side. I’d be happy to update them, but I think it’s best if I get it to work first.

can you send a screenshot of what your field mappings look like as defined in the plugin? I’m running 3.x locally and the Dynmics CRM plugin doesn’t even show the tabs for field mappings which is odd.

Mappings only appear after you’ve authenticated correctly. Company mappings only appear when you select the feature to pull companies. It looks like this: