Error connection to O365

Description

Mailspring is throwing an error when attempting to log into a corporate O365 account.

To Reproduce…

Steps to reproduce the behavior:

  1. Go to add Office 365 account
  2. Authenticate from browser
  3. Token passed to Mialspring. Git page displays success
  4. 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: ab506eeb-6b77-4668-a1b2-17c17ce7d400\r\nCorrelation ID: f536c795-4309-4ea1-bb8f-0c6f4fd728db\r\nTimestamp: 2022-03-11 21:18:09Z”,“error_codes”:[9002327],“timestamp”:“2022-03-11 21:18:09Z”,“trace_id”:“ab506eeb-6b77-4668-a1b2-17c17ce7d400”,“correlation_id”:“f536c795-4309-4ea1-bb8f-0c6f4fd728db”}

Expected Behavior

The expected behavior is the refreshed token is stored and access is granted.

Screenshots

Setup

Hi there!
Go check this other post which seems related to your issue! Hope this will help you.