MailCore / mailcore2

MailCore 2 provide a simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP. The API has been redesigned from ground up.
Other
2.59k stars 623 forks source link

How to set the scope for Outlook #1978

Open gnmmdk opened 1 year ago

gnmmdk commented 1 year ago

I use this library to obtain the oauthtoken for Outlook: https://github.com/AzureAD/microsoft-authentication-library-for-android

The scope set is: private val mScopes = listOf( "User.Read", "Mail.Read", "Mail.ReadWrite", "Mail.Send" )

Alternatively: private val mScopes = listOf( "User.Read", "IMAP.AccessAsUser.All", )

This way, I can get a token, but using this token, IMAPSession checkAccount failed(Unable to authenticate with the current session's credentials.). Here is my configuration: image