Hi Miturria,
I had the same problem. I solved it with a small python script and the o365 library.
I got from our IT a ClientID and ClientSecret and some rights for Email.Read an Email.Send.
So currently I’m connecting to Microsoft for authentication and using the MSGraph API to pull the mails like fetchmail or getmail did. Please have a look at O365 .
1 Like