mguessan / davmail

DavMail POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange and Office 365 Gateway - Synced with main subversion repository at
http://davmail.sourceforge.net
GNU General Public License v2.0
558 stars 82 forks source link

O365Interactive & O365Manual: "The provided resource value for the input parameter 'scope' is not valid." #345

Closed thomashuss closed 3 months ago

thomashuss commented 3 months ago

I am attempting to set up my personal Outlook.com account with davmail 6.0.1 (debian stable) and the newest 6.2.2. I am using the enableOidc option to resolve the "API 2.0 error." However, now I am getting a different error about scope. The authentication window pops up twice briefly with no content apart from a loading bar, and the following messages appear in the log:

2024-04-01 15:30:09,573 DEBUG [JavaFX Application Thread] davmail.exchange.auth.O365InteractiveAuthenticatorFrame  - Webview location: https://login.microsoftonline.com/common/oauth2/nativeclient?error=invalid_scope&error_description=The%20provided%20resource%20value%20for%20the%20input%20parameter%20%27scope%27%20is%20not%20valid.
2024-04-01 15:30:09,669 DEBUG [JavaFX Application Thread] davmail.exchange.auth.O365InteractiveAuthenticatorFrame  - <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<HTML xmlns="http://www.w3.org/1999/xhtml">
    <HEAD/>
    <BODY/>
</HTML>

2024-04-01 15:30:09,669 DEBUG [JavaFX Application Thread] davmail.exchange.auth.O365InteractiveAuthenticatorFrame  - Location starts with redirectUri, check code
2024-04-01 15:30:10,608 ERROR [ImapConnection-57902] davmail.exchange.auth.O365InteractiveAuthenticator  - Authentication failed error=invalid_scope&error_description=The%20provided%20resource%20value%20for%20the%20input%20parameter%20%27scope%27%20is%20not%20valid.

The log file has 1271 lines and HTML resembling a login page appears many times. Looking through this HTML I can see the same error "We are unable to issue tokens from this API version for a Microsoft account" from before enabling enableOidc. I can provide the log file but I'm not sure what information is sensitive.

This same behavior is observed on both 6.0.1 and 6.2.2.

mguessan commented 3 months ago

DavMail is designed for Exchange servers, now migrated to the cloud under O365 name. Outlook live formerly hotmail is a different technology I believe.

Even if we manage to pass through the authentication not sure this can ever work. The error message means the EWS scope is not available so EWS endpoint probably does not exist.