How Microsoft 365 IMAP and POP Authentication Works with AD FS
Question details
Understand how Exchange Online authenticates IMAP and POP clients in a federated Microsoft 365 environment with AD FS.

- Product
- Exchange Online and Microsoft Entra ID with AD FS
- Device & OS
- not provided
- Scenario
- A Microsoft 365 organization uses directory synchronization and AD FS and needs to configure IMAP or POP access to Exchange Online mailboxes.
- Observed behavior
- The goal is to understand the federated sign-in flow and choose a supported authentication method for mail clients.
Confirm whether the mail client supports OAuth 2.0 for Exchange Online IMAP or POP, and identify which protocol the mailbox needs. An administrator may also need access to the Exchange admin center and Microsoft Entra admin center.
Use OAuth for Exchange Online IMAP or POP
Use this approach for a supported client that needs IMAP or POP access to a federated Exchange Online mailbox.
Historically, a basic authentication client sent a username and password to Exchange Online over TLS. In a federated environment, authentication could involve Microsoft Entra ID and AD FS validating the credentials against on-premises Active Directory.
Microsoft has retired basic authentication for Exchange Online IMAP and POP. With OAuth, the client obtains an access token through Microsoft Entra ID; a federated user may be directed to AD FS during sign-in. The client then uses the token to authenticate to Exchange Online.
In the Exchange admin center, open Recipients > Mailboxes, select the mailbox, and check its email app settings to confirm that IMAP or POP is enabled.
In the mail client's account settings, select Microsoft 365, Exchange Online, or OAuth 2.0 authentication, if offered. Use outlook.office365.com with port 993 and SSL/TLS for IMAP, or port 995 and SSL/TLS for POP.
Select Sign in or Authenticate in the client and complete the Microsoft Entra sign-in. Follow the AD FS and multifactor authentication prompts if your organization requires them.
If the client requires its own app registration, open the Microsoft Entra admin center and go to App registrations > New registration. Configure the appropriate Exchange Online delegated permission, such as IMAP.AccessAsUser.All or POP.AccessAsUser.All, and grant consent as required by your organization.

Configure Outlook automatically with an Exchange account
Use Outlook's automatic configuration when IMAP or POP is not required.
Work with Office documents in WPS Office
WPS Office is a free, lightweight, easy-to-use alternative for working with Office documents. Its familiar interface and Microsoft Office format compatibility make it easy to migrate document work, although it does not change Exchange Online or AD FS authentication.

Frequently Asked Questions
Can I still use a username and password for Exchange Online IMAP or POP?
No. Microsoft has retired basic authentication for Exchange Online IMAP and POP. Configure a client that supports OAuth 2.0, or use Outlook with an Exchange account.
Does OAuth mean AD FS is no longer involved?
Not necessarily. In a federated organization, Microsoft Entra ID may direct the user to AD FS during sign-in. The client then uses an OAuth access token to authenticate to Exchange Online.
Where can I check whether IMAP or POP is enabled for a mailbox?
In the Exchange admin center, go to Recipients > Mailboxes, select the mailbox, and review its email app settings for IMAP and POP access.
What server and ports does Exchange Online use for IMAP and POP?
Use outlook.office365.com with port 993 and SSL/TLS for IMAP, or port 995 and SSL/TLS for POP. Select OAuth authentication in the client rather than basic authentication.




