Fetching Mail from O365 - Definitive?

Hi all

Stood up a brand new RT 5 server today, works great except I want to get it working with email.

Having looked at a few guides and some search results on this parish, I have not been able to get fetchmail to work (Following error):

getmail version 5.13
Copyright (C) 1998-2019 Charles Cazabon. Licensed under the GNU GPL version 2.
SimpleIMAPSSLRetriever:tickets@domain.co.uk@outlook.office365.com:993:
getmailrc-support: credential/login error (LOGIN failed.)
0 messages (0 bytes) retrieved, 0 skipped

I am trying to fetch mail from a Shared Mailbox, but have also tried from a licensed, standrd mailbox as well with no 2FA enabled. Same error.

What is the easiest way to fetch mail from an O365 account? I understand there is some preperarion to do in 365, which is not simple either.

Anyone have a definitive up-to-date guide on getting Office 365 mailboxes working with RT5?

Thanks in advance.

have a look here Microsoft's retirement of basic authentication / OAUTH2 and RT - #9 by Manuel_Lauk