Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET IMAP

 AfterLogic Forum : MailBee.NET IMAP
Subject Topic: MS announcement to retire basic auth Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
mnoreen
Newbie
Newbie


Joined: 17 July 2012
Location: United States
Online Status: Offline
Posts: 16
Posted: 23 September 2019 at 8:52am | IP Logged Quote mnoreen

https://developer.microsoft.com/en-us/office/blogs/end-of-support-for-basic-authentication-access-to-exchange-online-apis-for-office-365-customers/

We use the Mailbee IMAP library extensively to read various service based email accounts in o365. Any guidance on how to address this would be greatly appreciated.

Note, we have many console apps written in .NET (4.8) that run on a server on many scheduled tasks. I understand we'd need to somehow register our "application" (I'm assuming that can be a generic one for our company), but we cannot involve any "user" interaction. These are utility apps. Glancing at the existing sample code in the Mailbee doc, they all seem to involve popping up a browser window to get someone to interact with "asking permission." And that's what we need to avoid.

We've used Mailbee all this time to mask the complexities of IMAP, I hope the library is able to help us with this new, forced direction.
Back to Top View mnoreen's Profile Search for other posts by mnoreen
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2140
Posted: 23 September 2019 at 9:04am | IP Logged Quote Alex

I don't think it's possible to avoid user interaction with OAuth 2.0. This is exactly what it's about - user interaction (because passwords can be stolen, etc).

I'd try to check if what you're trying to achieve using service accounts. This is certainly doable with Google apps (and there is a tutorial in MailBee on this) but not sure if Microsoft service accounts can do the same. But it at least is worth trying.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
mnoreen
Newbie
Newbie


Joined: 17 July 2012
Location: United States
Online Status: Offline
Posts: 16
Posted: 24 September 2019 at 6:51am | IP Logged Quote mnoreen

Thanks Alex.

FWIW, I've started reviewing the new Microsoft Graph API which is a REST based API for accessing all things o365. In the doc, it does mention "Client credentials grant flow" as part of the oAuth spec

see: https://developer.microsoft.com/en-us/graph/blogs/30daysmsgraph-day-12-authentication-and-authorization-scenarios/

and

https://tools.ietf.org/html/rfc6749#section-4.4

so it looks like that may be a path... albeit a much more complicated one than just using a username and password along with the IMAP component! Maybe it will make more sense to you and you'll have some way to incorporate that into the library over the next year :)

Thanks again.
Back to Top View mnoreen's Profile Search for other posts by mnoreen
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2140
Posted: 24 September 2019 at 7:15am | IP Logged Quote Alex

Thanks. I see they are using certificate-based auth process - indeed, service accounts.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
mackolo22
Newbie
Newbie


Joined: 09 October 2018
Online Status: Offline
Posts: 38
Posted: 05 March 2020 at 2:12am | IP Logged Quote mackolo22

Hi,
I would like to know if MailBee supports or will support OAuth2 authentication for Office 365 accounts? I know that it works great for Gmail. Will given code work fine as well as all IMAP/POP3/SMTP operations?

string xOAuthKey = OAuth2.GetXOAuthKeyStatic(email, accessToken);
imapClient.Login(null, xOAuthKey, AuthenticationMethods.SaslOAuth2);
Back to Top View mackolo22's Profile Search for other posts by mackolo22
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2140
Posted: 05 March 2020 at 2:31am | IP Logged Quote Alex

Hi,

MailBee will support it when MS starts supporting it. Currently, it's not supported. Stay tuned to this discussion:

https://stackoverflow.com/questions/29747477/imap-auth-in-office-365-using-oauth2

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
mackolo22
Newbie
Newbie


Joined: 09 October 2018
Online Status: Offline
Posts: 38
Posted: 05 March 2020 at 2:35am | IP Logged Quote mackolo22

Hi Alex,

Thanks for the link. I hope they will implement this ASAP. :D
Back to Top View mackolo22's Profile Search for other posts by mackolo22
 
Jan vV
Newbie
Newbie


Joined: 27 March 2020
Online Status: Offline
Posts: 1
Posted: 06 April 2020 at 10:43am | IP Logged Quote Jan vV

It looks like that StackOverflow post is the only place where someone states that Microsoft is working on an OAuth implemenation for IMAP. For the rest, deafening silence...

Obviously Microsoft is forcing everyone to use Graph instead of the standard protocols (they mention them as 'legacy'instead of 'standard').
I don't mind if I have to add OAuth in my applications where I access mailboxes. But I cannot believe that we all have to migrate everything to use Graph. And it looks like we all are going to develop our own implementation. Why can't I find a standard library that handles mail through Graph?
Back to Top View Jan vV's Profile Search for other posts by Jan vV
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2140
Posted: 07 April 2020 at 1:25am | IP Logged Quote Alex

Probably the closest you can get is this? Never used, though. It's just what Google finds.

https://github.com/microsoftgraph/msgraph-sdk-dotnet

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide