How to sync zotero files with OneDrive via WebDAV?

In the 'Preference' >> 'Sync' I choose to sync the attachments with WebDAV, and I fill up the WebDAV URL with the help of this page:
https://blogs.msdn.microsoft.com/robert_mcmurray/2014/09/30/using-the-webdav-redirector-with-onedrive-part-1-standard-security/

The URL is https://d.docs.live.net/0E39A1EECEFE102C/zotero/. The username and password is my Microsoft account. When I click the verify I get:

https://d.docs.live.net/0E39A1EECEFE102C/zotero/ is not a valid WebDAV URL address.

I have the folder 'zotero' in the root folder of my OneDrive, and my account has no two-step-authentication. I can set up WebDAV connection with WinSCP.

So how to sync zotero files with OneDrive via WebDAV?
  • I have disabled Two-Step-Authentication, so there is no option to generate an application password.
  • Sorry, misread your post. Are you manually entering the "zotero" part in your URL or just letting Zotero add it. If you go to the address in your browser, what happens?
  • I'm also dealing with the same problem...

    When I type the address https://d.docs.live.net/ABCDEFGHIGKLMNOP in my browser, it goes to my Onedrive webpage interface,

    but when I copy this address in Zotero WebDAV URL, it returns with

    https://d.docs.live.net/ABCDEFGHIGKLMNOP/zotero/ is not a valid WebDAV URL address.

    My Two-Step-Authentication option of Zotero is OFF.

    Thanks!
  • I had the same problem, when I tried to setup Zotero with WebDAV using Box.com. I got an error saying that I'm not passing correct URL, even though the same URL worked when I tried using it with other software that supports the protocol (WinSCP).

    The solution? I ignored the error and clicked OK in the dialog box used to setup the synchronization. The sync started working without any problem. It seems that at least some of the settings that are entered in the sync setting dialog box are updated only after you click OK to accept them.

    I think the similar problem might be with OneDrive - in fact I confirmed that the form of OneDrive's URL that all in this thread have tried ( https://d.docs.live.net/[cid]) works in WinSCP.
  • same problem here, I think the automatically added "zotero" making this url invalid.
  • @horizonl: No, that wouldn't be the case. You need write access to the URL you enter, and when that's the case Zotero should be able to create the "zotero" subdirectory itself. If your WebDAV server is somehow configured such that you aren't able to create new directories via WebDAV, you can try create a subdirectory named "zotero" yourself (e.g., in some other file interface the provider gives you), which could work, but that would still suggest a server misconfiguration.
  • You are right. I tested that the url(https://d.docs.live.net/[cid]/zotero/) works in WinSCP, don't know why it cannot works in zotero.
  • Similarly does not work.
  • edited April 9, 2020
    Unfortunately, I have to confirm that using OneDrive's URL for WebDAV still returns an error:

    https://d.docs.live.net/cid/zotero/ is not a valid WebDAV URL

    On the other hand, this very URL works perfectly fine for the file system access both on Windows 10's Explorer and Nautilus under Linux. It really is a bummer that Zotero probably has some bug. I have over 100 Gb of attachments and I have to rent a Nextcloud instance specifically for Zotero, which is unfortunate considering I have 1 Tb in OneDrive.
  • @andselisk: Can you provide a Debug ID for clicking Verify Server?
  • edited April 10, 2020
    @dstillman: Debug ID: D1082762907. Thank you!

    P.S. Switching between http and https makes no difference.
  • HTTP OPTIONS http://[…]@d.docs.live.net/[…]/zotero/ succeeded with 404

    X-Firefox-Spdy: h2
    cache-control: no-cache, no-store
    content-length: 0
    date: Fri, 10 Apr 2020 07:54:36 GMT
    expires: -1
    pragma: no-cache
    set-cookie: […]
    strict-transport-security: max-age=31536000
    x-content-type-options: nosniff
    x-msedge-ref: Ref A: 51230A500FD4468587632C4F551E86FA Ref B: BRU30EDGE0513 Ref C: 2020-04-10T07:54:37Z
    x-msnserver: RD281878052511
    x-odwebserver: […]
    Right, so this isn't a bug in Zotero. The server is returning a 404 without a DAV header for an OPTIONS request, which is the request a WebDAV client uses to determine if a server supports WebDAV. From 10.1 of RFC 4918, the WebDAV specification:
    This general-header appearing in the response indicates that the resource supports the DAV schema and protocol as specified. All DAV-compliant resources MUST return the DAV header with compliance-class "1" on all OPTIONS responses.
    So Zotero is saying, correctly, that the URL is not a WebDAV URL. Other clients that are working for you might not be checking for a DAV header, but it's supposed to be there if this is a WebDAV server.
  • @dstillman: thank you very much for such a detailed and substantial answer. So the problem is on the Microsoft's side. Is there a way to disable DAV header check in Zotero so that it is also able to "cooperate" with OneDrive?
Sign In or Register to comment.