Exchange Connection Problems

Troubleshoot Exchange Online OAuth2 Authentication for POP3 and IMAP Mailboxes

Bushra ParveenBushra Parveen Nov 13, 2026 869 views

Question details

Identify and resolve OAuth2 authentication failures when an application connects to an Exchange Online mailbox using POP3 or IMAP.

Troubleshoot Exchange Online OAuth2 Authentication for POP3 and IMAP Mailboxes
Product
Microsoft Exchange Online and Microsoft identity platform
Device & OS
not provided
Scenario
An application needs authenticated POP3 or IMAP access to an Exchange Online mailbox using OAuth2.
Observed behavior
Authentication can fail because of incorrect app permissions, token configuration, expired access tokens, mailbox access settings, or SSL certificate validation errors.
Before you start

Identify whether the application uses delegated sign-in or the client credentials flow, and collect the authentication error, tenant ID, app ID, and connection settings. Do not include access tokens, client secrets, or private keys in logs shared for troubleshooting.

Solution 1Recommended

Verify app permissions, consent, and mailbox authorization

Use this check when token acquisition or mailbox authentication fails after registering an application.

1
Identify the authentication flow

Open the application's authentication configuration and determine whether it signs in a user with delegated permissions or runs without a user using client credentials. Review Microsoft's documentation for authenticating IMAP and POP applications with OAuth before changing permissions.

2
Check Exchange API permissions

In the Microsoft Entra admin center, go to Identity > Applications > App registrations, select the app, and open API permissions. For delegated access, verify the applicable Office 365 Exchange Online permission: IMAP.AccessAsUser.All or POP.AccessAsUser.All. For app-only access, verify IMAP.AccessAsApp or POP.AccessAsApp and grant the required administrator consent.

3
Verify flow-specific app settings

For an interactive delegated flow, open Authentication in the app registration and confirm that the redirect URI exactly matches the application's request. For client credentials, open Certificates & secrets and verify that the configured certificate or secret is valid; this flow does not use a redirect URI.

4
Check mailbox access and protocol availability

In the Microsoft 365 admin center, go to Users > Active users, select the mailbox user, and open Mail > Manage email apps to check POP or IMAP availability. For app-only access, also follow Microsoft's Exchange Online guidance to register the service principal in Exchange and grant it access to the target mailbox; Entra API consent alone is not sufficient.

Verify app permissions, consent, and mailbox authorization
Microsoft Graph permissions are not interchangeable: Permissions granted for Microsoft Graph mail APIs do not automatically authorize POP3 or IMAP connections to Exchange Online. Verify permissions for the protocol and authentication flow actually used.
Free Microsoft Office alternative

Use WPS Office for Documents While You Troubleshoot Exchange Access

WPS Office is a free, lightweight alternative for document, spreadsheet, and presentation work, with a familiar interface and Microsoft Office format compatibility for easy migration. It does not repair Exchange OAuth2 authentication or replace a POP3/IMAP mail client.

Open and edit Microsoft Word .docx, Excel .xlsx, and PowerPoint .pptx files.Document mailbox settings and troubleshooting results in Writer or Spreadsheets.Use a familiar Office-style interface to move between productivity tools easily.Continue working with downloaded Office attachments independently of mailbox authentication.
QA img-9

Frequently Asked Questions

Why does POP3 or IMAP reject a token that was issued successfully?

Token issuance does not guarantee mailbox access. Check the token's audience and permissions, confirm POP or IMAP is enabled for the mailbox, and verify the application's XOAUTH2 request. App-only access also requires Exchange service-principal registration and mailbox authorization.

Can I use Microsoft Graph Mail.Read permission for an IMAP connection?

No. Microsoft Graph permissions authorize Graph API calls, not Exchange Online IMAP access. In Microsoft Entra admin center > App registrations > your app > API permissions, verify the applicable Office 365 Exchange Online IMAP permission instead.

Does the client credentials flow use refresh tokens?

No. When an access token expires, the application requests a new one from the token endpoint using its configured client credential. Check Certificates & secrets in the app registration if the credential has expired or been replaced.

Should I disable SSL certificate validation to get the mailbox connection working?

No. Check the configured hostname, certificate chain, trusted-root store, and any TLS-inspecting proxy. For Exchange Online, use outlook.office365.com with TLS on IMAP port 993 or POP3 port 995.

Can WPS Office fix Exchange Online OAuth2 authentication?

No. These failures must be resolved in the application's authentication settings, Microsoft Entra configuration, Exchange mailbox authorization, or TLS trust configuration. WPS Office can handle Office documents and downloaded attachments, but it is not an Exchange authentication repair tool.