Project Overview
Enterprises often lack visibility and control over their business communications. Critical emails slip through cracks, manual sorting wastes hours, and outbound emails pose severe data leak risks. Building enterprise CRM integrations that support both legacy on-premise Exchange servers and modern Office 365 tenants is technically complex, requiring expertise in both EWS (Exchange Web Services) and Microsoft Graph APIs.
To solve this, MDS engineered MailGovern, a robust API-first governance platform. We implemented Microsoft Graph API Webhooks (Change Notifications) and Delta Queries for efficient, real-time sync in Office 365, while maintaining full backward compatibility with EWS for on-premise Exchange.
Azure AD & Application Permissions
Instead of relying on fragile client-side plugins, MailGovern operates 100% in the background. We integrated Azure Active Directory (Azure AD) using OAuth 2.0 Client Credentials flow. With administrator consent, the platform securely authenticates server-to-server, gaining strictly scoped application permissions to monitor designated mailboxes across the entire organization seamlessly.
Microsoft Graph Webhooks & Delta Queries
To ensure real-time responsiveness without aggressive polling, we implemented Microsoft Graph API Change Notifications (Webhooks). When an email is sent or received, Graph pushes an event to our Node.js infrastructure. We then use Delta Queries to fetch only the changed state, drastically reducing API calls and avoiding Microsoft's strict throttling thresholds while syncing thousands of active mailboxes.
Have a similar challenge?
Our experts can help you build custom integrations and plugins tailored to your business workflows.
Legacy EWS Fallback
For enterprise clients operating legacy on-premise Exchange servers, modern Graph APIs are unavailable. We engineered a robust abstraction layer that falls back to Exchange Web Services (EWS) SOAP calls. This ensures MailGovern can deliver the exact same workflow automation and data loss prevention features regardless of whether the client is fully cloud-native or strictly on-premise.
Key Challenges
Challenge 1
Normalizing disparate APIs (legacy SOAP-based EWS and modern RESTful Microsoft Graph) into a single, unified data structure.
Challenge 2
Scaling the background synchronization engine to process millions of emails securely without hitting API rate limits or throttling walls.
Challenge 3
Providing full automated email governance without requiring end-users to install brittle, platform-specific client add-ins.
Challenge 4
Meeting strict enterprise security requirements (SOC 2, GDPR, HIPAA) through flexible Cloud SaaS and On-Premise air-gapped deployments.
Results & Outcomes
MailGovern successfully normalized email communications across Microsoft Graph, EWS, and Google Workspace into a single, highly actionable schema. The server-side architecture eliminated the need for client installs, drastically reducing IT overhead and support tickets. By intelligently combining Webhooks and Delta queries, the platform safely processes millions of emails per month, enforcing DLP policies and automating CRM data entry in real time across massive enterprise environments.


