Access mail services using OAuth2

Hello,

I’'m trying to create imapClient providing access token (obtained by login with MSAL library) directly into the constructor of the client, but i get Unauthorized error, why that happen?

I’m using the first example of this tutorial Access Mail Services using OAuth|Documentation

Hello @Berkshire,

Refer to the following article about prerequisite settings, getting a token using MSAL and connection using ImapClient. Thanks.