OneDrive for Bussiness - Failed to connect

I have installed Duplicati under Docker on my unRAID home server. Would like to use OneDrive for Bussiness as a backend but I can’t manage to establish connection to it. Error I am getting says ‘‘Failed to connect: No SharePoint web could be logged in to at path’’. Below you can see login format I use.


Do you have any idea why I can’t establish a connection?

I have just tested with OD4B and managed to get it working, by logging in to the OD4B acount and creating an empty folder (called testfolder).

If you click the three dots you see in the screenshot, you can get the “Copy destination to clipboard”. It should look something like this:


For the username you used email address like for example ‘‘’’ or just ‘‘username’’?

When I only use ‘‘username’’ I get an error saying: Failed to connect: The type initializer for ‘Microsoft.SharePoint.Client.Resources’ threw an exception.

I used the full email address, like
I also logged into OD4B first, which prompted me to change the password.

I’m just using Duplicati 2.0 beta for the first time (long time 1.3 user)
And when trying the One Drive for bussiness backend, I get this same error:
“No SharePoint web could be logged in to at path ‘’. Maybe wrong credentials. Or try using ‘//’ in path to separate web from folder path.”

However the error is aleatory, I have managed to complete an initial backup of 9GB to the OneDrive 4 Biz backend, but after several tries. Credentials are fine, as is the path,but I haven’t found a way to reproduce it consistently.

It would help a lot if it was possible to get some logging from the MS side of things.

Does anyone know if it is possible to get logs from MS ?

Did you back up to One Drive 4B from Duplicati 1.3 at all?

I can answer that: no, OD4B is not supported in 1.3.x :wink:

1 Like

@Cloudbyte_Pony did you get this working? Here it is always blocking on the list/verify. Uploading is fine.

I´m using the same setup as wisebear and getting the same error message. I´ve filled in everything correct but I think it has somthing to do with that the university has a login page that pops up after I enter the email adress to login on the onedrive webpage.
Also I seem to be missing the option “additional security verification” for setting up an app spesific password.

Anyone know how I can get this working?

Hi, I have the same problem here. "Maybe wrong credentials. Or try using ‘//’ in path to separate web from folder path.”

This is the connection string being used.


I´m using 2FA. And have created an app password for Duplicati. But i cannot get it past “test connection”

I´m on But i have tested the latest canary as well. Running a Docker container. (unRAID) Have tried both to bridge the LAN, and to use same IP as host.

I tried OneDrive Personal and it worked on first attempt, no problem at all.

Has anyone got it working with 2FA and app password?

The error in log.

Dec 29, 2017 12:29 PM: Request for gave error
System.Net.WebException: No SharePoint web could be logged in to at path ''. Maybe wrong credentials. Or try using '//' in path to separate web from folder path.
  at Duplicati.Library.Backend.SharePointBackend.getSpClientContext (System.Boolean forceNewContext) [0x00070] in <1e96623231d94ecd98631cef66e60b62>:0 
  at Duplicati.Library.Backend.SharePointBackend.Test () [0x00000] in <1e96623231d94ecd98631cef66e60b62>:0 
  at Duplicati.Server.WebServer.RESTMethods.RemoteOperation.TestConnection (System.String url, Duplicati.Server.WebServer.RESTMethods.RequestInfo info) [0x000b7] in <a6c0c2089b9a44ec9be5057a44f12116>:0 
  at Duplicati.Server.WebServer.RESTMethods.RemoteOperation.POST (System.String key, Duplicati.Server.WebServer.RESTMethods.RequestInfo info) [0x00091] in <a6c0c2089b9a44ec9be5057a44f12116>:0 
  at Duplicati.Server.WebServer.RESTHandler.DoProcess (Duplicati.Server.WebServer.RESTMethods.RequestInfo info, System.String method, System.String module, System.String key) [0x0026e] in <a6c0c2089b9a44ec9be5057a44f12116>:0

If you’re POSITIVE the URL & path are right then this is sounding to me like an API change at their end - of course I know little of OD4B so I could be wrong…

From what i have read here at the forum, the syntax of connection string should be ok. If i copy/past to my browser, i end up in that folder. I have also tried to generate a new app password. but no luck.

And tried with the Windows version now, but i get the same error.


Sorry youtr still having problems - unfortunately I don’t use OD4B myself so can’t really test anything out.

It sounds like you’re able to directly log into your account so there probably isn’t an expired password as it sounds like @kenkendk might have run into back in August.

Hopefully he or another One drive For Business user will have someone thoughts…

Hell,I think someone mentioned idea that maybe HTTP_USER_AGENT is important, is it possible ?

I’m not finding that in the forum…could it have been art GitHub?

Sorry, it was on github :slight_smile:

This comment:

Thanks for linking that.

I’m not seeing any specific useragent being set with the SharePoint or OneDriveForBusinessBackend code so perhaps it never got set - or maybe there’s a generic value being set elsewhere.

Perhaps somebody using One Drive For Business could try a test backup with Fiddler or something similar running and see what’s actually being passed in the requests?

Hi, tried that but not very familiar with Fidler.

I compared the nonworking OD4B with a connection to OneDrive Personal. But i cant really see any difference other than JSON - status OK / JSON - Message=No SharePoint web could be logged in to at path… Maybe wrong credentials. Or try using ‘//’ in path to separate web from folder path.", Type=WebException

Let me know if i can to anything else.


Will do. Just to confirm, you’re still stuck at “Test Connection”, right?