Subject: Authentication to Microsoft Office365 via OAUTH2 for IMAP and SMTP clients
Date: 2022-09-02 14:39:56
From: yurienricardo
Source: authentication-microsoft-office365-via-oauth2-imap-smtp-clients

Hi, we are trying to authenticate O365 using OAUTH2 but getting Authenticate failed.

ImapClient.Connect("", 993, ComponentPro.Net.SslSecurityMode.Implicit);
ImapClient.AuthenticateAsync(token, ImapAuthenticationMethod.OAuth20);

SmtpClient.Connect("", 587, ComponentPro.Net.SslSecurityMode.Explicit);
SmtpClient.AuthenticateAsync(token, ImapAuthenticationMethod.OAuth20);

Token is for Client App flow.

We couldn't find any example for ComponentPro.

What are the correct API permissions to accomplish this and what scopes need to be set for Client APP flow?



Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.

Back to ComponentPro Q&A Forum Index