# Dynamics CRM integration not syncing contacts bi-directional

**URL:** https://forum.mautic.org/t/dynamics-crm-integration-not-syncing-contacts-bi-directional/13911
**Category:** Product Support
**Created:** [April 15, 2020, 12:21pm UTC](https://forum.mautic.org/t/dynamics-crm-integration-not-syncing-contacts-bi-directional/13911 "2020-04-15T12:21:57Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![majesteitbart](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/majesteitbart/32/1617_2.png) [@majesteitbart](https://forum.mautic.org/u/majesteitbart)
#### Post date: [April 15, 2020, 12:21pm UTC](https://forum.mautic.org/t/dynamics-crm-integration-not-syncing-contacts-bi-directional/13911/1 "2020-04-15T12:21:57Z")

</div>

**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.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/f/fe8d996444a3653935cf614b9f4d71b804f4b79e.png)

---

<div class="post-metadata">

### Author: ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)
#### Post date: [April 15, 2020, 12:34pm UTC](https://forum.mautic.org/t/dynamics-crm-integration-not-syncing-contacts-bi-directional/13911/2 "2020-04-15T12:34:36Z")

</div>

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

[https://docs.mautic.org/en/plugins/microsoft-dynamics-crm](https://docs.mautic.org/en/plugins/microsoft-dynamics-crm)

and the field mapping part here:

[https://docs.mautic.org/en/plugins/plugin-resources/field-mapping](https://docs.mautic.org/en/plugins/plugin-resources/field-mapping)

and followed these steps for testing:

[https://docs.mautic.org/en/plugins/plugin-resources/testing-integrations](https://docs.mautic.org/en/plugins/plugin-resources/testing-integrations)

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

---

<div class="post-metadata">

### Author: ![majesteitbart](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/majesteitbart/32/1617_2.png) [@majesteitbart](https://forum.mautic.org/u/majesteitbart)
#### Post date: [April 15, 2020, 12:49pm UTC](https://forum.mautic.org/t/dynamics-crm-integration-not-syncing-contacts-bi-directional/13911/3 "2020-04-15T12:49:22Z")

</div>

Haha, there are no bad questions, thanks for the response 🙂

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.

---

<div class="post-metadata">

### Author: ![btbounteous](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/btbounteous/32/1341_2.png) [@btbounteous](https://forum.mautic.org/u/btbounteous)
#### Post date: [April 17, 2020, 2:56pm UTC](https://forum.mautic.org/t/dynamics-crm-integration-not-syncing-contacts-bi-directional/13911/4 "2020-04-17T14:56:10Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![majesteitbart](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/majesteitbart/32/1617_2.png) [@majesteitbart](https://forum.mautic.org/u/majesteitbart)
#### Post date: [April 20, 2020, 7:34am UTC](https://forum.mautic.org/t/dynamics-crm-integration-not-syncing-contacts-bi-directional/13911/5 "2020-04-20T07:34:34Z")

</div>

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

 ![screenshot mapping](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/4/4d7f28bf45b79227bab50a453d6901c17c48114d.png)

---

<div class="post-metadata">

### Author: ![dcmax](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dcmax/32/7206_2.png) [@dcmax](https://forum.mautic.org/u/dcmax)
#### Post date: [February 15, 2023, 6:45pm UTC](https://forum.mautic.org/t/dynamics-crm-integration-not-syncing-contacts-bi-directional/13911/6 "2023-02-15T18:45:40Z")

</div>

i have the same issue now on february 23

mautic 4.4.6  
sql 5.7.41-cll-lve  
php 8.0.27

the integration worked one time but not sync all contatcs  
after i have cleaned the database (removed anonymous contacts and optimized database)

the integration works without error but show

contacts send 0 updated, 0 created, 0 with error and 0 ignored

(i have deleted duplicated contact from powerapps table editor on 365 platform)

---

<div class="post-metadata">

### Author: ![garrison](https://avatars.discourse-cdn.com/v4/letter/g/3bc359/32.png) [@garrison](https://forum.mautic.org/u/garrison)
#### Post date: [February 15, 2023, 8:09pm UTC](https://forum.mautic.org/t/dynamics-crm-integration-not-syncing-contacts-bi-directional/13911/7 "2023-02-15T20:09:35Z")

</div>

Hey! I am having the same issue with contacts. I can get companies to sync, but never contacts. Is there any information I can provide to help troubleshoot or resolve the issue?

@dcmax Let me know if you have any success pulling from CRM and I’ll do the same.

Update:  
I am able to push contacts to CRM, but get warnings when I do so. The records do sync successfully.

---

<div class="post-metadata">

### Author: ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)
#### Post date: [February 16, 2023, 8:20am UTC](https://forum.mautic.org/t/dynamics-crm-integration-not-syncing-contacts-bi-directional/13911/8 "2023-02-16T08:20:32Z")

</div>

Hi, I’m also very deep into trying to solve Dynamics errors. Are you on Slack? Can you hit me up?  
You can find me there as **Joey Keller**.  
Once we figure this out we can post the results.

---

<div class="post-metadata">

### Author: ![garrison](https://avatars.discourse-cdn.com/v4/letter/g/3bc359/32.png) [@garrison](https://forum.mautic.org/u/garrison)
#### Post date: [February 16, 2023, 10:36am UTC](https://forum.mautic.org/t/dynamics-crm-integration-not-syncing-contacts-bi-directional/13911/9 "2023-02-16T10:36:22Z")

</div>

I sent you a DM in the Mautic Slack instance.  
Talk with you soon.

---

<div class="post-metadata">

### Author: ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)
#### Post date: [February 16, 2023, 12:12pm UTC](https://forum.mautic.org/t/dynamics-crm-integration-not-syncing-contacts-bi-directional/13911/10 "2023-02-16T12:12:30Z")

</div>

Great, if anyone else has issues with the MS Dynamics and Mautic, here is a group we created, hopefully we can solve it.  
#dynamics-errors on Slack.
