there is no generic OAuth mechanism available for all mentioned webmail provider. It is not possible due to the fact how you "enable" OAuth authentication in your application. Basically, you need to register your application at your webmail provider and this is provider depended.
That said, I have checked IMAP servers of mentioned providers and all of them supports OAuth2 authentication, so if you register your application at each of those providers and get the OAuth2 token based on theirs "howto's", you should be able to login to theirs IMAP servers. Here is a link to Microsoft's blog where you can read what you need to make OAuth2 authentication possible in your application.