Issue with accessing POP3 email account via OAUTH2

Hello everyone,

I want to use Aspose Email to access a POP3 email account at outlook.office365.com via OAUTH2. This has already worked. I have the example for this

used. I am currently unable to retrieve emails from the mailbox. I can retrieve the AccessToken, but when I execute the following statement “var connState = pop3Client.ConnectionState;” I get the ConnectionState “broken”. When executing the following statement “var mailboxInfo = pop3Client.GetMailboxInfo();” I get the exception with the message “Unable connect to the server”. Unfortunately, this error message is not very meaningful. Can anybody help me further?

Hello @un.be.kannt,

Thank you for writing to Aspose support.

Can you, please, share a code sample with us to test it on our side?

Program.zip (2.9 KB)

Hello everyone,

I have attached a code sample. For data protection reasons, I have made the username, password, tenant ID, client ID and client secret unrecognizable.

With my access data I get an access token, but when I execute the statement “var connState = pop3Client.ConnectionState;” returns the ConnectionState “Broken”.

When executing the statement “var mailboxInfo = pop3Client.GetMailboxInfo();” an exception is thrown with the message “Unable connect to the server”.

Thank you once again for the help.

@un.be.kannt
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): EMAILNET-41024

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@un.be.kannt,

Could you check connection with POP3 scope - Sign in to Outlook
according to Authenticate an IMAP, POP or SMTP connection using OAuth | Microsoft Learn

string[] scopeAr = new string[]
{
    "https://outlook.office.com/POP.AccessAsUser.All",
};