Office 365 login returns error "OAuth Code exchange returned 400 Bad Request"

Description

When I try to log in to my office 365 email address I get the following message:

Sorry, we have trouble logging you in

And the following error:

OAuth Code exchange returned 400 Bad Request: {“error”:“invalid_request”,“error_description”:“AADSTS9002327: Tokens issued for the ‘Single-Page Application’ client-type may only be redeemed via cross-origin requests.\r\nTrace ID: 68919119-2633-4af9-bf0f-900345ba1e01\r\nCorrelation ID: 0ae7879e-6bbf-4868-b6b6-e86293b32a7d\r\nTimestamp: 2022-03-09 19:44:50Z”,“error_codes”:[9002327],“timestamp”:“2022-03-09 19:44:50Z”,“trace_id”:“68919119-2633-4af9-bf0f-900345ba1e01”,“correlation_id”:“0ae7879e-6bbf-4868-b6b6-e86293b32a7d”}

To Reproduce…

Steps to reproduce the behavior:

Option 1: Reconnect email

  1. Open mailspring
  2. Scroll down to Red alert saying you cannot be authenticated in bottom left corner
  3. Click reconnect, browser opens
  4. Enter your email credentials in browser
  5. Observe the error described above in mailspring app

Option 2: Add office 365 account

  1. Open mailspring
  2. Click mailspring -> add account...
  3. Click office 365
  4. Enter your email credentials in browser
  5. Observe the error described above in mailspring app

Expected Behavior

I am able to connect my office 365 account.

Screenshots

Setup

  • OS and Version: macOS Monterey 12.2.1 (21D62)
    • Installation Method: installer
  • Mailspring Version: Version 1.10.0 (1.10.0)

Additional Context

Mailspring required to re-login every day to my office 365 email, which I did without any problems for a couple of months, but as of today (09. March 2022), I am no longer able to re-login to my office 365 email.

10 posts were merged into an existing topic: Login to Office no longer working

2 votes have been moved. 2 votes could not be moved because their users already voted in the other topic.