Somebytes SoftwareSomebytes Software Development

(401) "401 Unauthorized Error" - Since Oktober 2022 on Office 365

Exchange test failed (exception): The request failed. The remote server returned an error: (401) Unauthorized.

The reason for the "sudden" error message is the long-announced end of basic authentication at EWS in Microsoft 365. ( https://learn.microsoft.com/en... )

Microsoft now relies on the so-called "Modern Authentication" which you can activate as follows.


  • Download the latest version of EEAttachments or ExMixedFolders.
  • Open the non-working server connections and empty the "Password" field.
  • Set the version selector to "Office 365" (if it was previously set to O365 OAuth, please set it back to "Exchange 209" and then back to "Office 365")
  • Click the "Sign in" button.
  • The Microsoft "Modern Authentication" dialog appears where you can enter your username and password again.
  • After you have entered your credentials and agreed that the application can access your data, the connection should work as usual again. If you do not have permission to consent to the app, then please continue reading here.