Any details regarding the connection Office365 email to Nextcloud?

I am basically stuck at the first step of trying to eval Nextcloud as we use Office365 and trying to access my email account from within Nextcloud is something of a blackhole.

To be clear the issue is caused by Microsoft and their design choices, but they are too big to care, so the only solution/support has to come from Nextcloud.

The first issue is that the Nextcloud mail app is written to auto-discover connection settings from the entered email address, but gets this total wrong as it makes no mention that OAuth2 needs to be configured, instead it just defaults to an IMAP/SMTP configuration using SSL/TSL and STARTTLS.

The app also provides zero logging to allow fault resolution.

So after much searching around I have found threads here and on GitHub that refer to OAuth2 and the Groupware setting under Administration for Microsoft integration. And now the next issue - unless you are a Microsoft Expert the small amount of text provided is meaningless. This results in even more searching (Note MS changed the service name to Entra to complicate things).

So is there anywhere a clear and simple guide to this process? Having followed some docs on setting up things on the MS side and copying the values across to Nextcloud all I now get in Nextcloud is the message “There was an error while setting up your account”, but as there is no detail in the log I have no idea what is going on.

Thanks

It seems that I should at least provide a follow-up regarding the issue I raised.

I was unable to find any details regarding the correct process to integrate Office365 accounts with Nextcloud, so this became something of a dead end.

It just so happens that Nextcloud is not the only system that has issues with Office365 so we already have a set of shadow Gmail business email accounts to deal with such issues. This allowed a change of focus, but the following came to light

  • Google has complicated the process by adding the requirement to add a validation number to the IMAP/SMTP setup. Netcloud has done its best to change it’s interface to support this, but the step does make setup more complicated for the end user.

  • Google has decided to kill its IMAP/SMTP interface in September of next year. At least when Microsoft did this for Office365 they allowed customers to re-enable it.

The end result is rather a dead eval process. With 2 major email providers messing about with their support for basic mail APIs it is left to Nextcloud to commit major resources to the development of full OAuth2 connectors. From what I have seen this is nontrivial when coding to a single OAuth2 provider to do a well-defined task. I guess a full generic solution that handles all possible email and calendar tasks against a range of email providers is a major undertaking.

Sadly until such an undertaking is completed and then deployed by partners my eval is on hold.