Fetch email from o365 - modern way

Hi there,
is it possible for Best Practical or a forum member to create an understandable howto on fetching mail for RT5 from O365 using modern authentication instead of basic SMTP credentials?
I know of a thread on here that mentions one or two python scripts that could be of help, but i (but maybe more users) would very appreciate a proper write up for connecting RT5 to o365 in a proper way.

You can see this tool for more information:

ok looking good!
so this needs to be installed like a module?

It’s more of a standalone tool that you’d schedule with cron, I don’t believe you need to configure anything within RT for it. Just point it to the rt-mailgate web endpoint like the /etc/aliases file examples

Root cause of the issue responsible for what you describe is that that fetchmail does not understand OAuth2 natively. Not yet, anyway.

What you can do is use a wrapper script on fetchmail to or use the plugin as described above and make sure you configure plugin correctly