+1 vote

We have tried all the steps as mentioned in the below link –

https://www.limilabs.com/blog/oauth2-client-credential-flow-office365-exchange-imap-pop3-smtp

We want to use POP3 but example given in your blog is related to IMAP. So we have went ahead with the IMAP example.

But we are getting below mentioned error: AUTHENTICATE failed.

We are using office 365 and are able to connect using web mail.

The server we are connecting is "outlook.office365.com" and we have enabled modern authentication and done all the settings as mentioned in your above blog link.

Kindly let us know how to proceed on the same.

by

1 Answer

0 votes
 
Best answer

The article is correct and accurate. You need to perform every single step that is described there.

How does your code look like?

Usually people use incorrect ids and/or invalid scope - double check every single value you enter.

Another common mistake is not performing "Grant admin consent" step, it is also important to allow modern authentication:

https://www.limilabs.com/blog/office365-enable-imap-pop3-smtp

Have you performed Power Shell configuration of accounts in Exchange?
Double check PowerShell them:

Get-ServicePrincipal -Organization [TODO]
Get-MailboxPermission -Identity [TODO]
by (297k points)
Sorry for delayed reply.

The previous query is resolved and it worked properly.

We realized that we were using wrong ClientId/TenantID. So once we resolved this issue, the problem solved.

Thanks for your immediate support.

We are now further testing / verifying the Demo DLL with Gmail and Exchange Online. It is working properly for Office 365.
...