Could not create SSL/TLS Secure Channel for OneDrive backup


I can’t get my backups to OneDrive to run any more, every time they run (manual or scheduled) I get the following message:
“The request aborted:Could not create SSL/TLS secure channel.”

The ‘Test Connection’ button in the ‘Configuration’ ‘Edit…’ screen works successfully but the actual backups will not run.

I have dug the following out from a Fiddler capture:

“Message”: “The underlying connection was closed: An unexpected error occurred on a send.”,
“Exception”: “System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. —> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. —> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host\r\n at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)\r\n at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)\r\n — End of inner exception stack trace —\r\n at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)\r\n at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)\r\n — End of inner exception stack trace —\r\n at Duplicati.Library.Main.Operation.BackupHandler.HandleFilesystemEntry(ISnapshotService snapshot, BackendManager backend, String path, FileAttributes attributes)\r\n at Duplicati.Library.Main.Operation.BackupHandler.RunMainOperation(ISnapshotService snapshot, BackendManager backend)\r\n at Duplicati.Library.Main.Operation.BackupHandler.Run(String sources, IFilter filter)\r\n at Duplicati.Library.Main.Controller.<>c__DisplayClass17_0.b__0(BackupResults result)\r\n at Duplicati.Library.Main.Controller.RunAction[T](T result, String& paths, IFilter& filter, Action`1 method)\r\n at Duplicati.Library.Main.Controller.Backup(String inputsources, IFilter filter)\r\n at Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)”,

Is this likely to be a OneDrive setting I need to update to allow Duplicati to write to it? Or do I need to set something in Duplicati?

Help appreciated!


Microsoft has discontinued the API that Duplicati uses. There is a new API (called the Graph API), which you need to use instead.

The latest canary and experimental versions of Duplicati has a new backed called OneDriveV2 which uses the new API. Unfortunately we stumbled a bit getting the beta out before the API was shut down.

I hope to release the next beta some time this week, including the new OneDrive backend.


I’ve updated to and tried updating my backups to use the new API and it still fails, I’ve tried creating from scratch and I still get the following error:
(Inner Exception #1) System.AggregateException: One or more errors occurred. —> System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
The test connection works fine in the edit config screens

is it possible duplicati is still trying to use v1 of the API? I’ve noticed when editting a config for a backup it often pulls in the Name from a different backup - could it be doing the same with the API when it runs?