Can't get an IMAP mail access for an Office365 or Gmail account working


Using Kmail I am trying to get access to an imap mail account set up in Office365, also two more in GMail.

Sadly I cannot get it working. It needs OAuth authentication.

When I set up a GMail account Kmail offers the imap ssl authentication “Gmail”. But kmail doesn’t open that login window needed to grant the akonadi ressources access to GMail.

If I set up an online account for it with KDE systemsettings the only permission I get is access to Youtube uploads…

For Office 365 there is no option to add an online account nor does Kmail offer me SSL with the OAuth authentication method.

Yes I checked in Thunderbird and both work there but I really do not like Theunderbird and also all my other mails live in kmail ) important to have all in one place for filtering, searching, archiving and such… )

How does it work?
Am I missing someting here?

Thanks for reading,