How to Configure Microsoft 365 Shared Mailboxes in IMAP Clients with OAuth2
Question details
Users need to authenticate and configure Microsoft 365 shared mailboxes in IMAP clients (like Thunderbird, K-9 Mail, and Apple Mail) using OAuth2.

- Product
- Microsoft 365
- Device & OS
- not provided
- Scenario
- Configuring IMAP email clients to access Microsoft 365 shared mailboxes using modern OAuth2 authentication.
- Observed behavior
- Basic authentication fails, and email clients cannot authenticate when using the shared mailbox address directly as the username.
Ensure you have a licensed Microsoft 365 user account with 'Full Access' permissions to the shared mailbox, and verify that your chosen email client natively supports OAuth2 authentication for IMAP.
Authenticate with a Licensed User Account via OAuth2
Instead of using the shared mailbox address to log in, you must authenticate using your personal licensed Microsoft 365 account that has delegation rights.
Since Microsoft has disabled basic authentication, IMAP clients must use modern OAuth2 authentication. You can no longer log in by entering the shared mailbox address as your username and password.
Open your IMAP-supported email client (such as Thunderbird or K-9 Mail) and navigate to the settings to add a new email account.
In the 'Email Address' field, input the exact email address of the shared mailbox you wish to access.
Set the authentication method for both the Incoming (IMAP) and Outgoing (SMTP) servers to 'OAuth2'.
When the Microsoft 365 login prompt appears, do not enter the shared mailbox details. Instead, input the email address and password of your personal licensed user account that has permission to access the shared mailbox.
Approve the sign-in request using your authenticator app or SMS code if prompted by your organization's security policies.

Verify IMAP and Shared Mailbox Permissions
Ensure that IMAP is enabled for the specific shared mailbox and that your user account has the correct access rights.
Enhance Your Productivity with WPS Office
While troubleshooting your Microsoft 365 email configuration, consider using WPS Office as a lightweight, comprehensive alternative to Microsoft Office. It offers seamless compatibility with major document formats and a familiar interface without the heavy subscription costs.
- 1. Download the Installer: Visit the official WPS website and download the free WPS Office installer for your operating system.
- 2. Install WPS Office: Run the downloaded setup file and follow the simple on-screen instructions to complete the installation.
- 3. Start Creating: Open WPS Office to instantly start creating, editing, and managing your documents, spreadsheets, and presentations.

Frequently Asked Questions
Why does Apple Mail fail to connect to my Microsoft 365 shared mailbox via IMAP?
Apple Mail's native IMAP setup does not fully support the specific OAuth2 authentication flow required to map a primary user's credentials to a secondary shared mailbox in Microsoft 365. For Mac users, switching to clients like Thunderbird or Microsoft Outlook is recommended for shared mailboxes.
Can I still use basic authentication for Microsoft 365 IMAP connections?
No, Microsoft has completely deprecated basic authentication for Exchange Online to enhance security. All email clients connecting via IMAP must now support and use modern authentication (OAuth2).
Which email clients support OAuth2 for Microsoft 365 shared mailboxes?
Email clients that actively support modern OAuth2 authentication for Microsoft 365 include Mozilla Thunderbird, K-9 Mail (on Android), Microsoft Outlook, and the native Windows Mail app. Ensure your client is updated to the latest version to utilize these features.
What username should I use when prompted by the OAuth2 login screen?
Although you enter the shared mailbox address in the email client's initial setup screen, you must enter your personal, licensed Microsoft 365 account credentials (email and password) when the Microsoft sign-in window appears.




