Microsoft Office365 Account

Has anyone figured out how to add an Office365 email account to the mail app? I can add Google mail no problem, but I still use an O365 account and as part of my de-microsofting plan, I want to use the nextcloud email app instead.

I have tried a whole series of variations based on two different sites that claim to do it using very different IMAP settings and so far, nothing has worked. Hopefully I am just being dumb, as Office365’s site CLAIMS they support IMAP. I have got the SMTP client to work (so I can send emails OK, I just can’t download them). Any tips appreciated.

So after more googling, I finally found an updated settings page on Office365. For anyone else trying to add a 365 account, the information here worked for me:

https://bit.ly/2MBEAHp

This link no longer works and points to something unrelated. Can you please update it?