Recently we have started facing this {} error when the delegated(User) token gets expired instead of {"error_description":"Invalid JWT token. The token is expired."} this descriptive error.
We are using OAuth v2.0 to create token it was working until last week. when we hit the Sharepoint Rest api it was giving proper error on that error we refresh the token but now it is throwing this {} error.
we faced this error for EMEA, Australia region as of now.
Please Help and let me know if something changed that I am not aware about.
There is no documented Microsoft announcement stating that SharePoint/OAuth is intentionally removing error_description or returning empty bodies. OAuth 2.0 spec does NOT guarantee a detailed error_description from resource APIs. Relying on HTTP status codes is the correct OAuth 2.0 strategy.
Proper implementation should rely on:
HTTP status code (401 Unauthorized)
Not string matching on error text, stop parsing error_description.
What To Verify, What HTTP status code are you getting now?
Is it 401?
Is it 403?
Is WWW-Authenticate header present?
Does this happen only for expired tokens or also for invalid tokens?
Recommended Action Plan
HTTP status code == 401
AND possibly WWW-Authenticate header
When you receive 401:
→ Automatically refresh token
→ Retry request
→ Do not rely on error body text.
→ Log full response headers for diagnostics.
✅ If this answer helped resolve your issue, please mark it as Accepted so it can help others with the same problem. 👍 Feel free to Like the post if you found it useful.
Was this reply helpful?YesNo
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.