I’m returning to this thread after a long time because I happened to stumble on something. I came across this page: Connecting securely to Microsoft OneDrive with WebDAV :: WinSCP. It describes how to connect to OneDrive using WebDAV with WinSCP. I gave it a quick go, and it seems to work fine. However, it doesn’t work in Duplicati, returning a “Failed to connect: The remote server returned an error: (404) Not Found.” (message from the ‘Test connection’ button). A quick search suggests that WinSCP also had this issue but that they were able to fix it (WebDAV to OneDrive cause error :: Support Forum :: WinSCP).
Does anyone know if there is a particular reason that this approach does not work with Duplicati?
I gave it a go but it didn’t immediately seem to work. I kept receiving 404 Not Found errors (attempting a backup in a directory that should exist), with or without the flag set. I cannot completely exclude that I am setting things up incorrectly though.
It may be worth noting that I recently found some time and motivation to take a better look at the OAuthHandler, and ended up writing my own service (with significant help from your version, especially to figure out what Duplicati expected of the service). It ended up being an interesting project to try out some things that I had been wanting to try for a while anyway. So far, that approach seems to be working alright. As a result, it is less important to get things working in another way, though it’s still interesting.