Have you tried using the hardcoded Thunderbird (or similar) oauth credentials to authenticate to Google et al? You can also use davmail to proxy your requests to Office 365 / Exchange and it handles oauth also.
I tried both. The error from davmail suggests it was specifically blocked/prohibit and I failed using actual Thunderbird.
I tried both. The error from davmail suggests it was specifically blocked/prohibit and I failed using actual Thunderbird.