Fixing the FluentSMTP Microsoft 365 423 'Forbidden' and 422 'Unauthorized' Errors
Content
Many users of the FluentSMTP plugin encounter a frustrating roadblock when integrating with Microsoft 365 or Outlook.com: the 423 "Forbidden" or 422 "Unauthorized" error. This error appears in the test results or email logs, halting email delivery from a WordPress site.
Based on community reports and troubleshooting discussions, this error is almost always a permissions issue on the Microsoft side, not a bug within the FluentSMTP plugin itself. The error is a response from Microsoft's API indicating that the application (your FluentSMTP connection) is not authorized to send mail from the specified account.
Why This Error Happens
The single most common cause, as identified by users, is a mismatch between the Microsoft account used to create the API credentials and the "From Email" address configured in FluentSMTP. Microsoft's permissions are strict; the account that owns the mailbox must also be the one to grant API sending permissions.
Other potential causes include:
- Using an admin account to create the API app but a different shared mailbox (e.g.,
[email protected]) as the "From Email". - Insufficient API permissions granted in the Azure App registration.
- The mailbox being used lacks an active Microsoft 365 license or is not a valid, dedicated mailbox.
- A recent password change or security update on the Microsoft account that invalidated the existing tokens.
Most Effective Solutions
If you see a 423 or 422 error, follow these steps to resolve it.
Solution 1: Ensure Email Address Alignment (The Most Critical Step)
This is the fix that resolves the vast majority of cases. The email address you use for every step must be identical.
- Account for API Creation: You must log into the Microsoft Entra Admin Center with the exact same email account that you intend to use as the "From Email" in WordPress.
- Account for Granting Permissions: During the app registration and consent process, you must approve the permissions using that same account. You cannot use a global admin account to approve permissions for a different user's mailbox.
- From Email in FluentSMTP: In your WordPress dashboard under FluentSMTP → Settings → Primary Connection, the "From Email" field must be that same email address.
If you need to send from a shared mailbox, you must log in as a user who has direct "Send As" permissions for that mailbox and use that user's account to create the API app.
Solution 2: Verify Azure App Registration Settings
Incorrect settings in your Azure app can cause immediate failures.
- Log into the Microsoft Entra Admin Center.
- Go to Applications → App registrations and select your FluentSMTP app.
- Under Authentication, ensure the Redirect URI is exactly:
https://yourdomain.com/?fluent-mail-auth=1(replacing "yourdomain.com" with your actual domain). - Under API permissions, ensure you have granted Mail.Send and User.Read (delegated) permissions and that an admin has granted consent for them.
Solution 3: Check Mailbox Type and License
Microsoft's API will return authorization errors if the account is not set up correctly.
- Ensure the "From Email" account is a licensed Microsoft 365 user with an active mailbox. It cannot be a shared mailbox without a assigned license.
- Confirm the mailbox is not over its storage quota.
Solution 4: Re-authenticate the Connection
If the connection was working and suddenly started failing, the OAuth token may have expired or been revoked. Simply go to your FluentSMTP settings and click the "Re-Authorize" button to go through the Microsoft login process again. This often resolves intermittent 422 errors.
Summary
The 423 "Forbidden" and 422 "Unauthorized" errors are a common hurdle when configuring FluentSMTP with Microsoft 365, but they are almost always solvable by meticulously aligning your email accounts and double-checking your Azure app settings. The key takeaway is to use one dedicated, licensed Microsoft 365 account for both creating the API credentials and sending mail.
Related Support Threads Support
-
Forbidden error 423https://wordpress.org/support/topic/forbidden-error-423/
-
Error 423 Forbiddenhttps://wordpress.org/support/topic/error-423-forbidden/
-
422 error on Microsoft 365 connectionhttps://wordpress.org/support/topic/422-error-on-microsoft-365-connection/
-
422 – Forbiddenhttps://wordpress.org/support/topic/422-forbidden/
-
Random failure with Microsoft API – error 423 – message Unauthorizedhttps://wordpress.org/support/topic/random-failure-with-microsoft-api-error-423-message-unauthorized/
-
How to fix “forbidden” error ?https://wordpress.org/support/topic/how-to-fix-forbidden-error/
-
Fluent SMTP forbids sending messages right after being configured.https://wordpress.org/support/topic/fluent-smtp-forbids-sending-messages-right-after-being-configured/
-
401 error when sending testhttps://wordpress.org/support/topic/401-error-when-sending-test/
-
Error 422 Not Found when sending Test email O365https://wordpress.org/support/topic/error-422-not-found-when-sending-test-email-o365/
-
Getting “Forbidden” when sending test emailhttps://wordpress.org/support/topic/getting-forbidden-whey-sending-test-email/
-
Office 365 API Error: Random 423 Unauthorizedhttps://wordpress.org/support/topic/office-365-api-error-random-423-unauthorized/
-
422 unauthorizedhttps://wordpress.org/support/topic/422-unauthorized/
-
Continuous 422 errorshttps://wordpress.org/support/topic/continuous-422-errors/
-
Office 365 – Error 423https://wordpress.org/support/topic/office-365-error-423/
-
forbidden error with MS 365https://wordpress.org/support/topic/forbidden-error-with-ms-365/
-
Error 422 when trying to send test emailhttps://wordpress.org/support/topic/error-422-when-trying-to-send-test-email-2/
-
Error 422 — unauthorizedhttps://wordpress.org/support/topic/error-422-unauthorized/
-
Error 423 forbidden MS 365https://wordpress.org/support/topic/error-423-forbidden-ms-365/
-
Microsoft 365 – 403 forbiddenhttps://wordpress.org/support/topic/microsoft-365-403-forbidden/
-
Forbidden (423)https://wordpress.org/support/topic/forbidden-423/
-
Error 422 when trying to send test emailhttps://wordpress.org/support/topic/error-422-when-trying-to-send-test-email/
-
Errorcode 422https://wordpress.org/support/topic/errorcode-422/
-
423 Not Foundhttps://wordpress.org/support/topic/423-not-found/
-
Azure/Office 365 API Response: 423 Unauthorizedhttps://wordpress.org/support/topic/azure-office-365-api-response-423-unauthorized/
-
Error 423https://wordpress.org/support/topic/error-423-2/
-
Office 365 API Error – FluentSMTPhttps://wordpress.org/support/topic/office-365-api-error-fluentsmtp/
-
423,”message”: “Forbidden FluentSPMT 365https://wordpress.org/support/topic/423message-forbidden-fluentspmt-365/
-
Office 365 Error 422 Forbiddenhttps://wordpress.org/support/topic/office-365-error-422-forbidden/