535 5.7.142: HVE: OAuth token about to expire
The OAuth access token an application used to authenticate to HVE was close to expiring, so Exchange Online rejected it.
- Microsoft
- Provider
- Permanent (5xx)
- Class
- Sources checked
- Author
At a glance
- Code
- 535 5.7.142
- Temporary or permanent
- PermanentRefused for good: the message comes back to the sender, and resending it gets the same answer.
- Who has to act
- The sender. The fix is on the sending side: your domain, your server or your list.
- What the server says
535 5.7.142 XOAUTH2 authentication failed. Token will expire soon.
What it means
HVE accounts can authenticate with OAuth through XOAUTH2. Exchange Online rejects an access token that is close to expiration and returns 535 5.7.142. The client must request a new token and retry authentication. Microsoft's advice is to make sure the session time does not exceed the token's expiry time, and to obtain a fresh token whenever possible.
Common causes
- The application reused an access token near the end of its lifetime.
- A long-running SMTP session started with a token that would expire during the session.
How to fix it
- 01Request a new OAuth token and retry authentication.
- 02Refresh tokens before they near expiry rather than waiting for a failure.
- 03Keep each SMTP session shorter than the remaining token lifetime.
Sources
What this page rests on, checked on 20 Oct 2026. The explanation is ours; the reply text is the server's.
- Email nondelivery reports and SMTP errors in Exchange Onlinelearn.microsoft.com
Related codes
- 535 5.7.143HVE: OAuth token expired.The application tried to authenticate to HVE with an OAuth access token that had already expired.
- 535 5.7.144HVE: app lacks the right API permissions.The OAuth token came from an app registration whose API permissions do not allow it to use HVE, so authentication failed.
- 535Authentication credentials invalid.The server rejected the login because the username, password or token is wrong or not sufficient for this account, so no mail is sent.
All 111 Microsoft codesEvery code in the wikiPaste your own bounce