Project Overview
The enterprise was utilizing a powerful custom CRM, but their sales and account management teams suffered from severe data silos. Calendar events (meetings, follow-ups) and critical client contacts were disjointed between the CRM and their Microsoft Exchange environments. Sales reps were forced to double-enter data, leading to missed meetings, outdated contact info, and zero visibility for management.
To eliminate this friction, MDS engineered a robust background Node.js synchronization daemon. Instead of requiring brittle client-side Outlook add-ins, we utilized the Microsoft Graph API to create a completely invisible, highly reliable sync engine. The system performs true bi-directional synchronization, handling conflict resolution and complex CRUD operations between the two distinct data schemas.
Microsoft Graph API Integration
We built the core synchronization engine entirely on the Microsoft Graph API. Operating strictly as a server-side daemon written in Node.js, the system communicates directly with Microsoft 365 servers. It utilizes Delta Queries to efficiently track creations, updates, and deletions for both Calendar Events and Contacts, translating those payloads into the custom CRM's specific REST structure.
Targeted Delegate Access (Secretary Rights)
Security was paramount; the daemon could not have read/write access to every mailbox in the organization. We configured an Azure AD application and utilized delegate access (often referred to as "secretary rights"). A designated service account was granted targeted permissions exclusively for the mailboxes requiring sync. The Node.js daemon then authenticated via OAuth 2.0 and impersonated the service account, ensuring strict, least-privilege security boundaries.
Have a similar challenge?
Our experts can help you build custom integrations and plugins tailored to your business workflows.
Bi-Directional Conflict Resolution
To support a true two-way sync, we implemented a robust conflict resolution engine backed by PostgreSQL. The database maps CRM entity IDs to Exchange Item IDs (and change keys) to track sync states. If an event title is updated in Outlook while the location is simultaneously changed in the CRM, the daemon algorithmically determines the winning payload based on timestamp heuristics, preventing endless sync loops and data loss.
Key Challenges
Challenge 1
Eliminating double-data entry for sales reps by synchronizing complex CRM entities with Exchange Contact and Event models.
Challenge 2
Handling bi-directional conflict resolution when a contact or meeting is updated simultaneously in both the CRM and Outlook.
Challenge 3
Securing targeted access to dozens of specific executive mailboxes without granting tenant-wide, unfettered access to all corporate emails.
Challenge 4
Ensuring maximum reliability for the background sync daemon without relying on users to install or update local Outlook add-ins.
Results & Outcomes
The background daemon achieved a 100% automated bi-directional sync, entirely eliminating the need for client-side Outlook add-in installations. The seamless integration saved an estimated 15 hours per week per sales representative by eliminating double data entry. Furthermore, the targeted delegate access model passed rigorous internal Infosec reviews by strictly limiting the daemon's read/write scope to only authorized mailboxes.


