Failed to connect to Onedrive with OAuth

Hi. Backups have been running fine since I set them up, I have also previously successfully restored files from Onedrive. Now, in need of a restore, the OAuth fails with this error:

Duplicati.Library.Interface.UserInformationException: Failed to authorize using the OAuth service: Error: NameResolutionFailure. If the problem persists, try generating a new authid token from: Duplicati OAuth Handler —> System.Net.WebException: Error: NameResolutionFailure

I have saved the previous key and set a new one, but I get the same error message with the new key. What to do? I can see the backup ran successfully yesterday, but I can’t restore it… I’m running Duplicati in docker.

Welcome to the forum @norwegian

Is (I think) failure of DNS (Domain Name System) to look up a host name (probably as in your link).

When I get these (without Docker), it’s usually because my Internet connection failed, thus no DNS. Typically it’s my own equipment needed a restart or something. It potentially could also be your ISP however those tend to start working again when your ISP fixes things. Can you test this in Docker?


which is probably similar to the name lookup that’s failing. If you like, you can test a ping of that too.

Hi. Thanks for the reply. Well, I’m not sure how I can run that in docker, because it’s through Unraid. If I try to run ping or nslookup in the docker terminal, it says the command is not found. That said, the backups are uploaded - new files are uploaded everynight to Onedrive, so why does that work and not restore…?

Ok, so I just found out what the problem is - I tried to restore to original location. Apparently that does not work, and gives me the error message I posted above. Now I tried a restore to a different location, and it works perfectly! Thankfully I can continue my work where I left off :slight_smile:

Thanks for pushing me in the right direction, at least!

That said - should this be logged as a bug, or am I the only one having this issue? It could be my access rights, but the error message from Duplicati was not exactly on target…?

That’s one of the drawbacks of Docker containers IMO – they can be quite lacking in “extra” tools.
Although this seems to be going in a different (unexpected) direction, you surely have some mono.

Secure Socket Layer (SSL) / Transport Layer Security (TLS) could serve as base for network test:

csharp -e ‘new System.Net.WebClient ().DownloadString (“”)’

although I can’t swear that you have the csharp command, but I suspect there’s a complete mono:

Fixed issues with the Docker images by including mono-complete, thanks @warwickmm.

Hard to say (and I can’t speak for all users), but this does not ring any bells for me. What version of Docker is this, and whose Docker is it? There are several packages, and Duplicati only makes one.

Ideally you would reproduce issues with something that Duplicati makes, before filing an issue on it. Unless you are on an extremely new Canary, I’d think a widespread issue would be widely reported.

Keeping the above in mind, feel free to poke at it if you like, to get the exact steps to reproduce this.

csharp also does not work. I can run curl commands, though. Not sure if that tells you something.

I am running (Docker Hub) docker in Unraid. It’s likely that it’s an issue with access rights in Unraid, but in my opinion that should perhaps give a more understandable error message than it does…?

Anyway, my problem is solved, filed under ‘note to self’ in the restore section… Thanks for caring!

You would have to say what you ran, e.g. can you get to OAuth handler when Duplicati can’t?

You would have to come up with steps to reproduce it from scratch, preferably without Unraid.
Duplicati needs far more volunteers, and existing ones tend to work on well-defined problems,
preferably ones that can be reproduced on the system they have, e.g. plain OS and local files.

I’m happy for that. Chasing more is up to you. If it’s a general issue, we might get other reports.

I just ran:


It pulls down the whole html file from that page (just an excerpt below), so yes, the duplicati docker terminal has access to the OAuth handler, and Duplicati doesn’t, from what I can tell.

Duplicati OAuth Handler

But then again - there are no issues backing up data and sending it to Onedrive.

Below might explain why restore to original location is worse, because typically system permissions provide wider read access (backup) than write access (restore). Restore elsewhere may avoid that.

This doesn’t explain how restore access error could cause an OAuth NameResolutionFailure though.

I think it would fail consistently and completely if that were true. OneDrive access totally needs OAuth.

I was of course pointing to the change done in Duplicati (not Linuxserver) Docker for mono-complete. Regardless, you were able to find that curl can get there at least sometime, so this is still mysterious.

Authentication and authorization basics for Microsoft Graph explains how OAuth access token works.
I also tried network tracing to watch Duplicati OAuth handler return access token, and Duplicati use it.

Regarding a file access problem on restore breaking OAuth, I tested, and can’t find the recipe for that.
What I tried doing was Duplicati.CommandLine.exe restore with --overwrite=true with no write access because I took it away in Windows File Explorer, and also changed the file so it would want to restore.

For that, please (if you like) see how someone without your specific equipment can cause the problem.