Hi...
WebmailHost is actually set to the value you give :
namespace oAuth_Limilabs_Pop3_Test
{
internal class Secrets
{
[...]
internal const string WebmailHost = "outlook.office365.com";
internal const int WebMailPort = 993;
}
}
So I'm good with scopes.
I have to add that when I use standard connection methods (not Async), I can connect correctly
Console.WriteLine("Create Pop3");
using (Pop3 pop3 = new Pop3())
{
pop3.ConnectSSL(Secrets.WebmailHost);
Console.WriteLine("connection done.");
pop3.LoginOAUTH2(userName, result.AccessToken);
Console.WriteLine("Login done.");
works fine !
Rest of code before this part is the same. So
var result = await app.AcquireTokenForClient(scopes).ExecuteAsync();
works also fine.
Just using LoginOAUTH2Async (with await) throws an error
I mean, the all Azure part is ok, while I can connect with standard method.
So I do not understand why asynchronous methods return error.