-
Notifications
You must be signed in to change notification settings - Fork 86
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
O365modern in server mode (docker) not working #48
Comments
This may be a device authentication issue => after authentication O365 checks that client has a valid certificate. As your Docker container obviously is not registered this will not work. Anyway, you should first find the right settings with DavMail in client mode, with O365Interactive or O365Manual. |
Thanks @mguessan |
Nope, O365Manual and O365Interactive open authentication dialogs and will thus not work in headless mode. |
Please make sure you test in standalone mode before trying server/docker/headless mode. You may have to use another clientId, see: Once you have it working in standalone mode, we can troubleshoot headless mode. |
Can we make interactive mode work on the CLI? Basically, what works for me in UI mode is the popup window that uses xdg-open to start the browser and then allows me to insert the resulting token into the window input line and finally clicking OK. What I did is to replace xdg-open with a shell script that copies the link into a file, I open that link with my browser outside of the container and then paste the resulting token back into the DavMail UI window. For me it would be nice if DavMail would support that "interactive" workflow in headless mode. E.g.
This way, I could run in headless mode again (running the container attached to a tty inside of tmux) and do the UI auth bits outside of the container without the need to do fancy X11 forwarding and library installation to support the UI. |
small correction... apparently, DavMail switches to manual mode when the proper libraries aren't installed. So in my case, I could see this:
which resulted in the "input OAUTH token" window / dialog which is perfectly fine for my workflow even though it requires the extraction of the Location header from the final POST response. |
…ested in #48 git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@3106 3d1905a2-6b24-0410-a738-b14d5a86fcbd
Makes sense, please check latest trunk for a command line implementation of manual authentication. You should probably also try to enable token persistence with: This will drastically reduce user interaction. |
Tried with latest trunk. However, the code in |
Indeed, can you please test again ? |
thanks... one step further but no success yet.
I paste the link into the console and hit return. The string contains the code and session_state query parms. It basically is this (which worked with the dialog when pasted there, so I assume it's the right thing):
I guess a bit more logging inside the |
OK. My fault. I did add the instrumentation code and build it from trunk myself to realize that I of course need a tty in the container... otherwise the readLine() will instantly return as stdin is eof. Looking good. Works for me :) Thanks! |
Great, thanks for your feedback => closing issue. |
I am trying to login to a MFA enabled O365 calendar account by using DavMail in server (docker, https://hub.docker.com/r/jberrenberg/davmail/) mode. As long as MFA was not enabled on the account, everything worked fine. Now that MFA is enabled, I have changed the davmail mode to O365modern. When accessing DavMail on port 80, I get asked for the password and after entering username & password I received the push notification authentication request on my mobile phone. After approving it, I see in the log of DavMail just a FAILED for that username and the browser ask me again for the username & password. The same happens if I use the CalDav URL in Thunderbird or on my mobile phone.
I even tried registering my own application with microsoft and entered it in the davmail.oauth.clientId config -> i still get the authentication push notification and the FAILED after approving the request.
Any idea what is going wrong and how to make it work?
Thanks.
The text was updated successfully, but these errors were encountered: