Fix OAuth SMTP Authentication for Exchange Shared Mailboxes
Question details
Users need to send emails via SMTP using OAuth authentication for a shared mailbox, but the authentication fails when the shared mailbox's email address is used directly.

- Product
- Microsoft Exchange
- Device & OS
- not provided
- Scenario
- Attempting to configure OAuth SMTP authentication to send emails from an Exchange shared mailbox without an independent password.
- Observed behavior
- OAuth SMTP authentication succeeds for licensed user accounts but fails for shared mailboxes because they cannot independently authenticate.
Verify that the licensed user account you plan to use has both 'Full Access' and 'Send As' permissions assigned for the target shared mailbox in the Exchange admin center.
Authenticate Using a Delegated Licensed User's OAuth Token
Since shared mailboxes do not have passwords, you must generate the OAuth token using a licensed user account and pass the shared mailbox address in the XOAUTH2 string.
Microsoft Exchange requires an active, licensed user account to authenticate SMTP connections. To send mail from a shared mailbox, the authentication protocol requires a licensed user's credentials to obtain the token, combined with the shared mailbox's identity in the connection string.
Log into the Exchange Admin Center, navigate to the shared mailbox settings, and ensure 'Full Access' and 'Send As' permissions are granted to the licensed user account.
Request an OAuth access token from Azure AD using the credentials (username and password) of the licensed user account, rather than the shared mailbox address.
Construct the SMTP XOAUTH2 authentication string by specifying the shared mailbox's email address as the identity, but use the OAuth token generated by the licensed user in the previous step.
Send the authenticated SMTP request to the Exchange server. The server will validate the licensed user's token and verify their permissions to send on behalf of the shared mailbox.
Enhance Your Productivity with WPS Office
While you manage Exchange server configurations, you can streamline your document workflow with WPS Office. It provides a lightweight, feature-rich, and highly compatible alternative to Microsoft Office without the heavy subscription costs.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package tailored for your operating system.
- 2. Install the application: Run the installer and follow the on-screen prompts to quickly set up WPS Office on your computer.
- 3. Open your files: Launch WPS Office to instantly open, edit, and save your existing Microsoft Office documents without any formatting loss.

Frequently Asked Questions
Why does OAuth SMTP authentication fail when I use the shared mailbox credentials?
Shared mailboxes in Microsoft Exchange are designed without independent passwords for security and licensing reasons. Therefore, they cannot generate their own OAuth tokens directly.
What permissions are required to send emails from a shared mailbox via SMTP?
The authenticating user account must have 'Full Access' and 'Send As' (or 'Send on Behalf') permissions for the shared mailbox to successfully route emails through it using an SMTP connection.
Can I assign a password to a shared mailbox to fix this authentication issue?
No, assigning a password to a shared mailbox violates Microsoft's licensing terms and security design. You must use a delegated licensed user account to handle authentication.
Where should I seek help if my OAuth token is still being rejected?
If your token is rejected despite correct permission setups, the issue likely resides within your Azure Active Directory app registration. You should consult the Azure AD Authentication documentation or community forums.




