Jul 21 2020 08:54 PM
Hi,
We have an automated process that reads incoming emails and extract attachments from an O365 inbox which has IMAP basic auth enabled. The org wants to disable basic auth and have us use either OAuth 2.0 or even better not use IMAP. Is there a recommended way to achieve this?
Can we use OAuth 2.0 authentication from a C# service application? Or is user input required for OAuth 2.0?
Are we able to move away from IMAP?
Thanks
Jul 26 2020 03:21 AM
Hey @Shivian D,
I am by no means a developer but i have somewhat heard about the question you raised. Oauth 2.0 does support authentication against office 365 services without user intervention. To start off you will have to register the application in azure and retrieve a 'client id' and 'client secret' which you can later use in the code for obtaining a token. The following articles should help you get started (EWS) :
https://www.emailarchitect.net/eagetmail/sdk/html/object_oauth_ews_service.htm
Thanks
Jul 26 2020 04:34 AM
@harveer singhaha that does sound promising. Thanks - will investigate that.