Menu

#121 Implement REST backend

Backlog
open
nobody
None
5
2018-11-21
2017-06-13
Jon Schewe
No

Recently the configuration on our Exchange server has changed such that we can still access it via the web using OWA, but not using EWS. Does Davmail have the ability to just talk OWA to get the mail services to work? Are the building blocks there to support such a thing?

Or perhaps an OWA to EWS gateway? Have you seen such a thing?

Discussion

  • Mickael Guessant

    Unfortunately no, the old Exchange 2003 server had the same endpoint for Webdav/OWA, but now you need EWS endpoint to access all messages/folders.

    Note that most Microsoft clients, including Skype for business and Outlook, need EWS access for some features to work properly.

     
  • Jon Schewe

    Jon Schewe - 2017-07-31

    I have since discovered that OWA uses a JSON API, so one could implement this. It may even be possible to convert between the JSON API for OWA and the SOAP API EWS.

    https://msdn.microsoft.com/en-us/library/office/dn776319(v=exchg.150).aspx

     
  • Mickael Guessant

    • status: open --> closed
     
  • Mickael Guessant

    Unfortunately this new JSON/REST api does not render full MIME message content, will not work.

     
  • Jon Schewe

    Jon Schewe - 2018-08-31

    There's an example of converting this JSON/REST data to EWS and it seems to be rendering full MIME message content.
    https://github.com/virtuald/ews-proxy

     
  • Mickael Guessant

    • status: closed --> open
    • Group: v4.7.3 --> v4.8.6
     
  • Mickael Guessant

    Very interesting indeed, it looks like they found a way to translate EWS to Json and back almost automatically... And they even reference DavMail as a use case.

    => need to find a way to authenticate against OWA
    => next step would be to have a specific EWSMethod to handle the Json case

     
  • Jon Schewe

    Jon Schewe - 2018-08-31

    For authentication they have a command line program that does it by redirecting the user to the OWA web page and then the tool captures the appropriate authentication bits.
    https://github.com/virtuald/ews-proxy/blob/master/cmd/ews-proxy/main.go#L43

    It may be possible for DavMail to pretend to be a web browser and fill in the form.

     
  • Mickael Guessant

    It's a bit more complex than just filling a form, yet the good news is that I have my first PoC to go through authentication on login.microsoftonline.com and send a REST on OWA REST endpoint https://outlook.office365.com/owa/service.svc

    Haven't yet tested MFA enabled users though: authentication logic is more complex, with BeginAuth/EndAuth/ProcessAuth

     
  • Mickael Guessant

    Update: we now have a working implementation of Oauth2 MFA authentication with Office 365, see: https://sourceforge.net/p/davmail/feature-requests/111/

    Note that this not enough for on premise Exchange without an available EWS endpoint.

     
  • Mickael Guessant

    Ticket moved from /p/davmail/support-requests/309/

     
  • Mickael Guessant

    • summary: OWA without Webdav --> Implement REST backend
    • Group: v4.8.6 --> Backlog
     
  • Mickael Guessant

    Most use cases are currently covered to EWS, may need to work on REST in the future

     

Log in to post a comment.