Setting up OneDrive (personal)

So what can I do to assist the debugging here? Next time I do this can I turn on more debugging info for you?

Or would it be enough for me to do an exact description of what happens?

To my initial guess it looks like the error coming back is incorrectly being interpreted as “connection fine, folder missing” as I am asked if I want to create a folder. This is my signal to hit cancel and flip the slashes.

(Sorry - can’t remember exactly what happens if I let Duplicati attempt to create the folder. I think it proceeds to tell me it created the folder and stumbles forward… but nothing was created and no access to OneDrive. This bit in brackets I’d need to check)

@BatterPudding, what version are you running? There was a bug in where the NormalizeSlashes method that @kenkendk linked to was not run. This was fixed in

This was with the beta version last week.

Just to clarify, were you using the OneDrive or OneDrive v2 backend? As @kenkendk mentioned, the NormalizeSlashes method is not called in the non-v2 version.

I have no idea. Whatever was last week’s beta is the one I was using.

Sorry, but I don’t follow all the development conversations on here so I have no idea who’s backend was in use.

An experimental (precursor to a beta) release just came out - hopefully a beta won’t be far behind. :slight_smile:

1 Like

The beta version is from april, if you are using the beta you are using the OneDrive v1 (aka the MS Live API), which should have stopped working on the 1st. The newer OneDrive v2 (aka the Graph API) is working now, but not include in the current beta.

You can tell which backend you are using in the “Storage Type” dropdown. The v1 version is labelled “Microsoft OneDrive” and the v2 version labelled “Microsoft OneDrive v2”.

Based on the discussion here, I think the slash issue will be fixed once the beta is created. Planned release some time next week.

Now I am confused. :smile: The Beta I am using seemed to be backing up to OneDrive okay. Well, the machine I was using yesterday seemed to complete a backup. Odd.

I’ll try and get access to a couple of these OneDrive setups later today and check exactly which version is in place. I’ll also watch out for next week’s Beta release and do a test install around it.

For any willing to do test installs to see if OneDrive v2 works well (important because we’re past the date when Microsoft has said the earlier version would go unavailable), please consider testing Experimental before Beta. This will also be an opportunity to gain some experience migrating backups to v2. I don’t think it’ll be automatic. Obviously don’t use Experimental for important backups, and also don’t count on returning to prior Beta easily.

@ts678 you are worrying me. Are you saying that all of my OneDrive backups are now useless? These are not installed in Test Environments. These are in fully working small companies. I have two of them setup backing up to the cloud so can’t really play games with them. They have to be run on the most stable versions.

And if you are saying that this upgrade will trash the old backups that doesn’t really make sense to me. I know I have swapped the delivery method of backups between Local files and SMB and FTP before and was impressed as to how resilient Duplicati was at that swapping around. So it surprises me to hear you say that it will not migrate from OneDrive v1 to v2

You are correct that changing the method of connecting to the backend destination shouldn’t “reset” your backups.

I think he meant installing the new experimental or beta version that supports v2 won’t automatically update your job to use v2 - you’ll have to do that manually.

While unlikely, it’s POSSIBLE the v2 API does something silly like connecting at a different folder level than v1 (which would cause Duplicati to THINK your backup was missing, when really it’s just in another folder path).

That’s the sort of thing we’re looking to confirm does NOT happen via the experimental release. :slight_smile:

I suspect it won’t be a problem at all since Canary users have been able to us v2 for a few months now and I don’t recall hearing about any such problems.

@JonMikelV The places I have OneDrive as a destination are small. So easy to do a manual check first. So I’ll spot if it is connecting at a different level. @ts678 has basically scared me off from going near the experimental releases. So I’ll wait for that beta and then do some manual checks when upgrading.

Absolutely not, It’s an Application Programming Interface (API) change as described by Microsoft in my link, however when this forced migration happens, they will be inaccessible until you reconnect using the v2 API.

Absolutely not, and you don’t even need to move files around (as other destination changes might require).

Not saying that. I mean Duplicati just won’t change the destination type for you. You must do that yourself, however for the small companies you support, I guess you’ll offer directions (see “gain some experience”).

These are standard precautions, and the difficulty of downgrades applies to Beta as well. It’s difficult, so it’s important that Beta be good quality. Achieving that is especially important given forced OneDrive migration.

So basically this Experimental could be last test call before Beta. Canary user base is probably far less than Beta (even though v2 came out on April 2 in canary, exposure is limited), so I’m trying to encourage (not scare off) testers of Experimental. There are risks, thus precautions, but better to discover issues early. Not everyone is willing and able to do a test install and meaningful test, but here’s a chance for any who are.

1 Like

FYI, I had a backup that used the old OneDrive API that I migrated to the v2 API. The only things I had to do were to change the storage type and generate a new authentication key. I did not have to change any paths, and the existing backup sets were recognized without any problems.

@warwickmm thank you for that confirmation. I know I am running a Beta version here so I don’t expect perfection. Though I do feedback anything I can about my experiences.

I have done plenty of beta testing of all kinds of odd products in my years. So understand the risks. This is why I am not using the Canary editions.

Hi everyone, I tried to change my current backups of Duplicati from OneDrive to OneDrive V2. Unfortunately this doesn’t work and I get the following error:

Failed to connect: BadRequest: Bad Request error from request Method: GET, RequestUri: ‘’, Version: 1.1, Content: <null>, Headers: { User-Agent: Duplicati/ Authorization: Bearer ABC…XYZ } StatusCode: 400, ReasonPhrase: ‘Bad Request’, Version: 1.1, Content: System.Net.Http.StreamContent, Headers: { Cache-Control: private Transfer-Encoding: chunked request-id: 69f2e8f5-1da4-46ba-8bbc-60e758d4558c client-request-id: 69f2e8f5-1da4-46ba-8bbc-60e758d4558c x-ms-ags-diagnostic: {“ServerInfo”:{“DataCenter”:“West Europe”,“Slice”:“SliceC”,“Ring”:“5”,“ScaleUnit”:“002”,“Host”:“AGSFE_IN_61”,“ADSiteName”:“WEU”}} Duration: 3.7835 Strict-Transport-Security: max-age=31536000 Date: Fri, 21 Dec 2018 12:07:27 GMT Content-Type: application/json } { “error”: { “code”: “BadRequest”, “message”: “Resource not found for the segment ‘root:’.”, “innerError”: { “request-id”: “69f2e8f5-1da4-46ba-8bbc-60e758d4558c”, “date”: “2018-12-21T12:07:27” } } }

Does anyone know what I can do? I’ve already tried the slash, but unfortunately no success.


Does that refer to the temporary workaround mentioned in Release: (canary) 2018-10-23 pointing to Path on server needs / at beginning when configurations are edited #3460? If not, could you clarify it please?

Microsoft Graph error responses and resource types says

400 Bad Request Cannot process the request because it is malformed or incorrect.

Addressing resources in a drive on OneDrive explains its format. I’m not sure if a double slash is helping any, and what’s the # for (and is that character allowed)? I’m not a OneDrive expert, and can’t help more in depth.

The # looks suspect to me (my configuration doesn’t appear to have one). Also, did you generate a new AuthID when changing to OneDrive v2?

Yes, it refers to that workaround But that didn’t help. I’ve tried one slash in front and two slashes.

The # is for pure organization so that the folder stands at the beginning. With the old one drive setting it was no problem at all.

Yes I did. But that seems not to be the problem. Does anyone else have an idea on that?