Error: InvalidAuthenticationToken: Token Expired

Summarize:ChatGPTPerplexity

Note: This guide applies to the Microsoft 365 / Outlook mailer in WP Mail SMTP.

What This Error Means

The OAuth access token WP Mail SMTP uses to authenticate with Microsoft has expired or been revoked. Microsoft tokens expire and require periodic re-authorization.

Common Causes

  • OAuth refresh token expired after 90 days of inactivity (the token self-renews on each use within that window)
  • You changed the Microsoft account password
  • An admin revoked app permissions in Azure AD
  • Someone modified the Azure app registration after Microsoft issued the token

How to Fix

Here is the complete step-by-step guide to resolving the error.

Step 1: Remove the Existing Connection

Start by logging in to your WordPress admin area and going to WP Mail SMTP » Settings.

WP Mail SMTP settings page

Then, scroll to the 365 / Outlook section and click Remove Connection.

Remove Connection button in the 365 / Outlook section

Step 2: Re-authorize the Plugin

Start by clicking Save Settings to confirm the disconnection. Then, click Allow plugin to send emails using your Microsoft account.

Allow plugin to send emails using your Microsoft account

Next, sign in with your Microsoft account in the popup that appears, and click Yes to grant the requested permissions.

Microsoft consent popup

Finally, wait for the popup to close. Look for the success notification confirming the connection.

Successfully linked Microsoft account

Step 3: Send a Test Email

Confirm the fix by sending a test email.

To test the fix, go to WP Mail SMTP » Tools and click the Email Test tab. Enter a recipient email in the Send To field, then click Send Email.

Test email tab

Once done, check for a success message, then check your inbox to confirm the email arrived.

Notes

  • If this error comes back frequently, check whether you recently changed your Microsoft account password. Password changes invalidate all existing OAuth tokens.
  • Security events like a suspicious login can prompt Microsoft to revoke tokens immediately.

That’s It! You now know how to fix the ‘InvalidAuthenticationToken: Token Expired’ error in Microsoft 365 / Outlook and get your emails sending again through WP Mail SMTP.

Try our Free WP Mail SMTP plugin

Use your favorite SMTP provider to reliably send your WordPress emails.