Hi,
Some years ago we have developed an daemon app called 'CheckMail', using C# and .NET Framework (and the MailKit Nuget pack
age). This app automatically (without user interaction) reads emails from one mailbox via IMAP.
The owner of the mailbox is external, a customer who has purchased CheckMail from us, and it can be a user mailbox or a shared mailbox. Most of our customers use Office 365, but some have other mail servers such as Exchange on premise or GMail et cetera.
For many years, this app has worked fine using IMAP with basic authentication, but that will no longer be possible when basic authentication for IMAP is disabled.
So now I'm working on a solution. I have managed to get it working with OAuth 2.0 using https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-authentication-flows#usernamepassword. I know it's not recommended to use username/password unless other options don't work, but it was the only viable solution I could find so far. Can you confirm that this solution will continue to work after basic authentication for IMAP is disabled?
I did also look at https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow but that would require our customer's admin to give us consent to access all their mailboxes, even when we only need access to one mailbox? And also I don't want to switch from IMAP to the Graph API unless there is no alternative, because IMAP also works with these other mail servers I mentioned.
Are we on the right track? It's a very important app for our company and our customers, so we really need it to continue working for hopefully many more years. Thanks in advance for your response!
Bart Clement