Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication failed: invalid user or password #349

Open
UlyssesZh opened this issue Apr 30, 2024 · 3 comments
Open

Authentication failed: invalid user or password #349

UlyssesZh opened this issue Apr 30, 2024 · 3 comments

Comments

@UlyssesZh
Copy link

UlyssesZh commented Apr 30, 2024

I ran into this problem on 6.2.2 for one of my outlook accounts. My other two outlook accounts are not affected. Context: #288 (comment)

log
2024-04-30 23:41:25,691 DEBUG [davmail.imap.ImapServer] davmail  - Connection from /169.231.127.132 on port 1143                                                                              
2024-04-30 23:41:25,691 INFO  [davmail.imap.ImapServer] davmail.connection  - CONNECT - 169.231.127.132:46718                                                                                 
2024-04-30 23:41:25,736 DEBUG [ImapConnection-46718] davmail.http.DavGatewaySSLSocketFactory  - createSocket outlook.office365.com 443                                                        
2024-04-30 23:41:25,883 DEBUG [ImapConnection-46718] davmail.exchange.ExchangeSession  - Test configuration status: 401                                                                       
2024-04-30 23:41:25,884 DEBUG [ImapConnection-46718] davmail  - > * OK [CAPABILITY IMAP4REV1 AUTH=LOGIN MOVE SPECIAL-USE UIDPLUS] IMAP4rev1 DavMail 6.2.2-3546 server ready                   
2024-04-30 23:41:26,214 DEBUG [ImapConnection-46718] davmail  - < 30 authenticate LOGIN                                                                                                       
2024-04-30 23:41:26,215 DEBUG [ImapConnection-46718] davmail  - > + VXNlcm5hbWU6                                                                                                              
2024-04-30 23:41:26,298 DEBUG [ImapConnection-46718] davmail  - < XXXXXXXXXXXXXXXXXXXXXXXX=                                                                                            
2024-04-30 23:41:26,298 DEBUG [ImapConnection-46718] davmail  - > + UGFzc3dvcmQ6                                                                                                              
2024-04-30 23:41:26,385 DEBUG [ImapConnection-46718] davmail  - < ********                                                                                                                    
2024-04-30 23:41:26,385 DEBUG [ImapConnection-46718] davmail.exchange.ExchangeSession  - Direct EWS authentication                                                                            
2024-04-30 23:41:26,385 DEBUG [ImapConnection-46718] davmail.http.HttpClientAdapter  - Creating NTCredentials for user [email protected] workstation 7493407be0fc domain                
2024-04-30 23:41:26,409 DEBUG [ImapConnection-46718] davmail.http.DavGatewaySSLSocketFactory  - createSocket outlook.office365.com 443                                                        
2024-04-30 23:41:27,185 DEBUG [ImapConnection-46718] davmail.http.HttpClientAdapter  - Add cookie [version: 0][name: exchangecookie][value: 07e3fd0eb4164acc80d58633ff74e564][domain: outlook.office365.com][path: /][expiry: Wed Apr 30 23:41:27 GMT 2025]                                                                                                                                 
2024-04-30 23:41:27,185 INFO  [ImapConnection-46718] davmail.connection  - FAILED - 169.231.127.132:46718 [email protected]                                                             
2024-04-30 23:41:27,185 ERROR [ImapConnection-46718] davmail  - Authentication failed: invalid user or password                                                                               
davmail.exception.DavMailAuthenticationException: Authentication failed: invalid user or password                                                                                             
        at davmail.exchange.ews.EwsExchangeSession.checkEndPointUrl(EwsExchangeSession.java:228)                                                                                              
        at davmail.exchange.ews.EwsExchangeSession.buildSessionInfo(EwsExchangeSession.java:237)                                                                                              
        at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:176)                                                                                                        
        at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:205)                                                                                                        
        at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:192)                                                                                               
        at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:93)                                                                                                
        at davmail.imap.ImapConnection.run(ImapConnection.java:155)                                                                                                                           
2024-04-30 23:41:27,186 DEBUG [ImapConnection-46718] davmail  - > 30 NO LOGIN failed                                                                                                          
2024-04-30 23:41:27,287 DEBUG [ImapConnection-46718] davmail  - < LOGIN ********                                                                                                              
2024-04-30 23:41:27,287 DEBUG [ImapConnection-46718] davmail.exchange.ExchangeSession  - Direct EWS authentication                                                                            
2024-04-30 23:41:27,287 DEBUG [ImapConnection-46718] davmail.http.HttpClientAdapter  - Creating NTCredentials for user [email protected] workstation 7493407be0fc domain                
2024-04-30 23:41:27,307 DEBUG [ImapConnection-46718] davmail.http.DavGatewaySSLSocketFactory  - createSocket outlook.office365.com 443                                                        
2024-04-30 23:41:27,363 DEBUG [davmail.imap.ImapServer] davmail  - Connection from /169.231.127.132 on port 1143                                                                              
2024-04-30 23:41:27,363 INFO  [davmail.imap.ImapServer] davmail.connection  - CONNECT - 169.231.127.132:46724                                                                                 
2024-04-30 23:41:27,388 DEBUG [ImapConnection-46724] davmail.http.DavGatewaySSLSocketFactory  - createSocket outlook.office365.com 443                                                        
2024-04-30 23:41:27,548 DEBUG [ImapConnection-46724] davmail.exchange.ExchangeSession  - Test configuration status: 401                                                                       
2024-04-30 23:41:27,548 DEBUG [ImapConnection-46724] davmail  - > * OK [CAPABILITY IMAP4REV1 AUTH=LOGIN MOVE SPECIAL-USE UIDPLUS] IMAP4rev1 DavMail 6.2.2-3546 server ready                   
2024-04-30 23:41:27,943 DEBUG [ImapConnection-46724] davmail  - < 94 authenticate LOGIN                                                                                                       
2024-04-30 23:41:27,943 DEBUG [ImapConnection-46724] davmail  - > + VXNlcm5hbWU6
2024-04-30 23:41:28,029 DEBUG [ImapConnection-46724] davmail  - < XXXXXXXXXXXXXXXXXXXXXXXX=                                                                                            
2024-04-30 23:41:28,029 DEBUG [ImapConnection-46724] davmail  - > + UGFzc3dvcmQ6                                                                                                              
2024-04-30 23:41:28,078 DEBUG [ImapConnection-46718] davmail.http.HttpClientAdapter  - Add cookie [version: 0][name: exchangecookie][value: 7867d5a94fa34eeba900d43ac4867cc7][domain: outlook.office365.com][path: /][expiry: Wed Apr 30 23:41:27 GMT 2025]
2024-04-30 23:41:28,078 INFO  [ImapConnection-46718] davmail.connection  - FAILED - 169.231.127.132:46718 [email protected]
2024-04-30 23:41:28,078 ERROR [ImapConnection-46718] davmail  - Authentication failed: invalid user or password
davmail.exception.DavMailAuthenticationException: Authentication failed: invalid user or password
        at davmail.exchange.ews.EwsExchangeSession.checkEndPointUrl(EwsExchangeSession.java:228)
        at davmail.exchange.ews.EwsExchangeSession.buildSessionInfo(EwsExchangeSession.java:237)
        at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:176)
        at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:205)
        at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:192)
        at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:93)
        at davmail.imap.ImapConnection.run(ImapConnection.java:128)
2024-04-30 23:41:28,078 DEBUG [ImapConnection-46718] davmail  - > 32 NO LOGIN failed
2024-04-30 23:41:28,115 DEBUG [ImapConnection-46724] davmail  - < ********
2024-04-30 23:41:28,115 DEBUG [ImapConnection-46724] davmail.exchange.ExchangeSession  - Direct EWS authentication
2024-04-30 23:41:28,116 DEBUG [ImapConnection-46724] davmail.http.HttpClientAdapter  - Creating NTCredentials for user [email protected] workstation 7493407be0fc domain 
2024-04-30 23:41:28,143 DEBUG [ImapConnection-46724] davmail.http.DavGatewaySSLSocketFactory  - createSocket outlook.office365.com 443
2024-04-30 23:41:28,913 DEBUG [ImapConnection-46724] davmail.http.HttpClientAdapter  - Add cookie [version: 0][name: exchangecookie][value: a15f3d5b77ba4f26b1527e6cd5671d74][domain: outlook.office365.com][path: /][expiry: Wed Apr 30 23:41:28 GMT 2025]
2024-04-30 23:41:28,913 INFO  [ImapConnection-46724] davmail.connection  - FAILED - 169.231.127.132:46724 [email protected]
2024-04-30 23:41:28,913 ERROR [ImapConnection-46724] davmail  - Authentication failed: invalid user or password
davmail.exception.DavMailAuthenticationException: Authentication failed: invalid user or password
        at davmail.exchange.ews.EwsExchangeSession.checkEndPointUrl(EwsExchangeSession.java:228)
        at davmail.exchange.ews.EwsExchangeSession.buildSessionInfo(EwsExchangeSession.java:237)
        at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:176)
        at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:205)
        at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:192)
        at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:93)
        at davmail.imap.ImapConnection.run(ImapConnection.java:155)
2024-04-30 23:41:28,913 DEBUG [ImapConnection-46724] davmail  - > 94 NO LOGIN failed
2024-04-30 23:41:29,005 DEBUG [ImapConnection-46724] davmail  - < LOGIN ********
2024-04-30 23:41:29,005 DEBUG [ImapConnection-46724] davmail.exchange.ExchangeSession  - Direct EWS authentication
2024-04-30 23:41:29,005 DEBUG [ImapConnection-46724] davmail.http.HttpClientAdapter  - Creating NTCredentials for user [email protected] workstation 7493407be0fc domain 
2024-04-30 23:41:29,054 DEBUG [ImapConnection-46724] davmail.http.DavGatewaySSLSocketFactory  - createSocket outlook.office365.com 443
2024-04-30 23:41:29,828 DEBUG [ImapConnection-46724] davmail.http.HttpClientAdapter  - Add cookie [version: 0][name: exchangecookie][value: 59248e56a0b64ab699b541806405e775][domain: outlook.office365.com][path: /][expiry: Wed Apr 30 23:41:29 GMT 2025]
2024-04-30 23:41:29,828 INFO  [ImapConnection-46724] davmail.connection  - FAILED - 169.231.127.132:46724 [email protected]
2024-04-30 23:41:29,828 ERROR [ImapConnection-46724] davmail  - Authentication failed: invalid user or password
davmail.exception.DavMailAuthenticationException: Authentication failed: invalid user or password
        at davmail.exchange.ews.EwsExchangeSession.checkEndPointUrl(EwsExchangeSession.java:228)
        at davmail.exchange.ews.EwsExchangeSession.buildSessionInfo(EwsExchangeSession.java:237)
        at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:176)
        at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:205)
        at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:192)
        at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:93)
        at davmail.imap.ImapConnection.run(ImapConnection.java:128)
2024-04-30 23:41:29,829 DEBUG [ImapConnection-46724] davmail  - > 96 NO LOGIN failed

I ran into this problem last night, and then the problem disappeared this morning. It then happens again this afternoon. I did not restart the server during the process or did anything.

@mguessan
Copy link
Owner

mguessan commented May 4, 2024

Most likely a server side issue then.

I found it strange that you can still access outlook.office365.com with simple username/password on EWS endpoint, and with an outlook.com account. Is this a personal (not company) account?

@UlyssesZh
Copy link
Author

This is a personal account registered 5 years ago.

@UlyssesZh
Copy link
Author

Do you mean I may have to use Office 365 modern authentication?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants