Troubleshoot Office 365 IMAP Authentication Triggering AD FS MFA
Question details
Determine why Office 365 IMAP authentication triggers AD FS MFA that the helpdesk application cannot complete.

- Product
- Microsoft 365 Exchange Online and Active Directory Federation Services (AD FS)
- Device & OS
- not provided
- Scenario
- A helpdesk application connects to an Office 365 mailbox through IMAP over SSL in a federated environment.
- Observed behavior
- AD FS treats the IMAP authentication as an extranet request and applies MFA, while browser access distinguishes intranet and extranet users as expected.
Identify the affected mailbox, helpdesk application's IMAP authentication method, and the time of a recent failed attempt. Confirm that you have access to the relevant AD FS and Microsoft Entra sign-in logs and policies.
Review the IMAP authentication path and AD FS MFA rules
Use this approach to identify why the helpdesk application's sign-in is classified differently from browser access.
An IMAP sign-in can follow a different authentication path from a browser sign-in. Check the claims and network context actually received by AD FS rather than assuming the request carries the helpdesk server's internal location.
Microsoft Knowledge Base article 3107357 discusses a historical POP and IMAP authentication issue involving the x-ms-client-application claim. Check whether its conditions apply to your configuration before making changes.
Open the helpdesk application's mailbox or IMAP account settings and identify whether it uses OAuth or legacy username-and-password authentication. Confirm that IMAP is enabled for the Exchange Online mailbox.
In the Microsoft Entra admin center, open Identity > Monitoring & health > Sign-in logs and search for the affected account and failure time. Check the authentication details, client application, and any applicable Conditional Access results.
On the AD FS server, open Event Viewer > Applications and Services Logs > AD FS > Admin and locate the corresponding authentication events. Review the AD FS access control or MFA rules, client application identification, relevant claims, and extranet lockout configuration.
Compare the failed IMAP attempt with a successful browser sign-in, including the client application and network context recorded in the logs. Review recent AD FS, proxy, helpdesk, and identity policy changes before adjusting any rule.
If the cause remains unclear, reproduce the failure and open a Microsoft Support request with the timestamps, relevant sign-in and AD FS events, and a sanitized trace. Share sensitive logs through the support case's secure channel.

Check whether the helpdesk application supports OAuth for IMAP
Use this option if the application relies on legacy authentication or cannot complete the required interactive sign-in.
Use WPS Office for Microsoft Office-compatible documents
WPS Office is a free, lightweight alternative for everyday document, spreadsheet, and presentation work. Its familiar interface and Microsoft Office format compatibility help users move existing files with less disruption. It does not manage IMAP mailboxes or fix AD FS authentication.

Frequently Asked Questions
Why does IMAP trigger MFA when browser access does not?
The IMAP sign-in may reach the identity system through a different path and present different client or network information. Compare the failed IMAP attempt in Microsoft Entra sign-in logs and AD FS events with the successful browser sign-in.
Does IMAP over SSL mean the application uses modern authentication?
No. SSL/TLS protects the connection in transit but does not determine the authentication method. Check the helpdesk application's mailbox settings or vendor documentation for OAuth support.
Can I use a Microsoft article about the x-ms-client-application claim?
Microsoft Knowledge Base article 3107357 describes a historical POP and IMAP authentication issue involving that claim. Review its conditions and compare them with your AD FS configuration and current Microsoft guidance before applying a change.
What should I send Microsoft Support?
Provide the affected account, failure timestamps, relevant Microsoft Entra sign-in and AD FS event details, the application's authentication method, and a reproducible sanitized trace. Use the support case's secure channel for sensitive information.




