Hello EspoCRM Team,
we are experiencing a critical issue with Microsoft 365 email integration after Microsoft enforced the migration of our tenant to EEA (European Economic Area) / EU Data Boundary licenses.
Based on our analysis and Microsoft’s official documentation, this appears to be a structural compatibility issue, not a configuration problem.
Environment
Observed behavior
We consistently observe the following pattern:
This leads to a situation where:
Microsoft documentation confirming the underlying risk
1) IMAP is a legacy protocol
Microsoft explicitly classifies IMAP (as well as POP and SMTP AUTH) as legacy protocols and recommends Microsoft Graph instead:
2) OAuth over IMAP has strict limitations
According to Microsoft documentation:
3) Microsoft Graph is the long-term supported approach
Microsoft clearly states:
IMAP OAuth is tolerated, but not a future-proof or reliable integration model.
Impact on EspoCRM
EspoCRM currently:
As a result:
Why this must be addressed long-term
Because IMAP OAuth is:
similar issues are expected to:
EEA tenants are impacted earlier, but this is not limited to EEA.
Request / questions
We would like to ask:
From an operational perspective, this already represents a blocking issue for some Microsoft 365 customers.
We would appreciate clarification on EspoCRM’s long-term strategy regarding Microsoft 365 inbound email integration.
Kind regards
we are experiencing a critical issue with Microsoft 365 email integration after Microsoft enforced the migration of our tenant to EEA (European Economic Area) / EU Data Boundary licenses.
Based on our analysis and Microsoft’s official documentation, this appears to be a structural compatibility issue, not a configuration problem.
Environment
- EspoCRM (self-hosted, on-premises)
- Microsoft 365 Exchange Online (EEA tenant)
- Inbound email: IMAP + OAuth 2.0 (XOAUTH2)
- Outbound email: SMTP / OAuth
- Security Defaults disabled
- Conditional Access explicitly allows the sign-in
Observed behavior
We consistently observe the following pattern:
- IMAP + OAuth may stop working after the EEA migration
- In some cases, the connection starts working again after a new OAuth token is issued
- However, the timing of token renewal or re-authorization cannot be controlled
- This makes the behavior inconsistent and unpredictable
- EspoCRM reports a generic connection error without a specific error code
- Azure Entra ID sign-in logs show successful authentication
- Exchange Online appears to silently reject the OAuth token during IMAP authentication
This leads to a situation where:
- Some users or tenants work temporarily
- Others fail
- Functionality may return after a token renewal, but cannot be relied on as a permanent solution
Microsoft documentation confirming the underlying risk
1) IMAP is a legacy protocol
Microsoft explicitly classifies IMAP (as well as POP and SMTP AUTH) as legacy protocols and recommends Microsoft Graph instead:
“IMAP, POP, and SMTP AUTH are legacy protocols.”
“Microsoft recommends using Microsoft Graph.”
Microsoft Learn:
https://learn.microsoft.com/exchange...by-using-oauth
“Microsoft recommends using Microsoft Graph.”
Microsoft Learn:
https://learn.microsoft.com/exchange...by-using-oauth
2) OAuth over IMAP has strict limitations
According to Microsoft documentation:
- IMAP supports delegated permissions only
- Application permissions and client-credentials flow are not supported
- OAuth token validation is strict and sensitive to tenant, region, and token lifecycle changes
“IMAP, POP, and SMTP AUTH support delegated permissions only.”
Microsoft Learn (same article)
Microsoft Learn (same article)
3) Microsoft Graph is the long-term supported approach
Microsoft clearly states:
“Use Microsoft Graph to access mailbox data instead of Exchange Online legacy protocols.”
Microsoft Learn – Outlook mail in Microsoft Graph:
https://learn.microsoft.com/graph/ou...ncept-overview
Microsoft Learn – Outlook mail in Microsoft Graph:
https://learn.microsoft.com/graph/ou...ncept-overview
IMAP OAuth is tolerated, but not a future-proof or reliable integration model.
Impact on EspoCRM
EspoCRM currently:
- Requires IMAP for inbound email
- Supports Microsoft Graph only for outbound email
- Depends on OAuth over a legacy protocol for inbound mail
As a result:
- Mail retrieval reliability depends on OAuth token lifecycle events
- Temporary recovery after token renewal is possible, but not deterministic
- Administrators have no control over when token renewal occurs
- This does not represent a stable or supportable long-term solution
Why this must be addressed long-term
Because IMAP OAuth is:
- a legacy protocol
- increasingly restricted by Microsoft
- sensitive to token lifecycle changes
similar issues are expected to:
- reoccur after future Microsoft platform changes
- affect additional tenants over time
EEA tenants are impacted earlier, but this is not limited to EEA.
Request / questions
We would like to ask:
- Is Microsoft Graph API support for inbound email on EspoCRM’s roadmap?
- Has EspoCRM validated IMAP OAuth specifically with Microsoft 365 EEA / EU Data Boundary tenants?
- Does EspoCRM consider the current IMAP-based approach sustainable given Microsoft’s direction?
From an operational perspective, this already represents a blocking issue for some Microsoft 365 customers.
We would appreciate clarification on EspoCRM’s long-term strategy regarding Microsoft 365 inbound email integration.
Kind regards

Comment