OneDrive Sync doesn't work on Windows 10

Joplin 1.0.224 (prod, win32)

Client ID: 666dfef4524448a9ab03ad73e36a3ddb
Sync Version: 1
Profile Version: 30
Keychain Supported: Yes

Revision: 1899d866 (master)

OS: Windows 10


Can someone help with the issue below?
OneDrive synchronisation silently fails. When I check the log.txt file I see the following error:

2020-06-30 15:07:17: “Saving updated OneDrive auth.”
2020-06-30 15:07:18: “Could not acquire synchroniser:”
2020-06-30 15:07:18: “Error: Access denied
Code: accessDenied
Header: {”_headers":{“cache-control”:[“private”],“content-type”:[“application/json”],“request-id”:[“c7c6e6d9-35aa-4364-b575-6193dc5ec712”],“client-request-id”:[“c7c6e6d9-35aa-4364-b575-6193dc5ec712”],“x-ms-ags-diagnostic”:["{“ServerInfo”:{“DataCenter”:“North Europe”,“Slice”:“SliceC”,“Ring”:“4”,“ScaleUnit”:“005”,“RoleInstance”:“AGSFE_IN_9”}}"],“strict-transport-security”:[“max-age=31536000”],“date”:[“Tue, 30 Jun 2020 13:07:15 GMT”],“connection”:[“close”],“content-length”:[“211”]}}
Request: GET https://graph.microsoft.com/v1.0/drive/special/approot null null {“headers”:{“Authorization”:“bearer eyJ0eXAiOiJKV1QiLCJub25jZSI6Im5sRnFLR2ItdVR3eVNQdEo4LXpqRHBGc1N5QTZSTDQwV1E4NFFUWVMxc2MiLCJhbGciOiJSUzI1NiIsIng1dCI6IlNzWnNCTmhaY0YzUTlTNHRycFFCVEJ5TlJSSSIsImtpZCI6IlNzWnNCTmhaY0YzUTlTNHRycFFCVEJ5TlJSSSJ9.eyJhdWQiOiIwMDAwMDAwMy0wMDAwLTAwMDAtYzAwMC0wMDAwMDAwMDAwMDAiLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC9lNWQxNTA2OS00MWEyLTQ4YmUtYTNmMy1kN2Y1MmRiMTY0MjUvIiwiaWF0IjoxNTkzNTE4NzgzLCJuYmYiOjE1OTM1MTg3ODMsImV4cCI6MTU5MzUyMjY4MywiYWNjdCI6MCwiYWNyIjoiMSIsImFpbyI6IkFTUUEyLzhRQUFBQWMrL1BkaEJTRXU3RkNhQjJGQlZBa05aQnowK1lQWlJIbnVGUCtHM0lubVE9IiwiYW1yIjpbInB3ZCJdLCJhcHBfZGlzcGxheW5hbWUiOiJKb3BsaW4iLCJhcHBpZCI6ImUwOWZjMGRlLWM5NTgtNDI0Zi04M2EyLWU1NmE3MjFkMzMxYiIsImFwcGlkYWNyIjoiMSIsImZhbWlseV9uYW1lIjoiTGlzZSIsImdpdmVuX25hbWUiOiJKb3NlIiwiaXBhZGRyIjoiOTIuMTUxLjQ5LjE2NyIsIm5hbWUiOiJKb3NlIExpc2UiLCJvaWQiOiIzMWI5NTZmZC1hZjAxLTQ2YzAtYjFhYi00M2I3MjMyOTExMmYiLCJvbnByZW1fc2lkIjoiUy0xLTUtMjEtMjEzMzcxMTk3Mi0zMjA5MzAzMTYwLTEzMDMyOT
Error: Access denied
at OneDriveApi.oneDriveErrorResponseToError (D:\Users\jose\AppData\Local\Programs\Joplin\resources\app.asar\lib\onedrive-api.js:124:19)
at OneDriveApi.exec (D:\Users\jose\AppData\Local\Programs\Joplin\resources\app.asar\lib\onedrive-api.js:267:24)
at async OneDriveApi.execJson (D:\Users\jose\AppData\Local\Programs\Joplin\resources\app.asar\lib\onedrive-api.js:321:20)
at async OneDriveApi.appDirectory (D:\Users\jose\AppData\Local\Programs\Joplin\resources\app.asar\lib\onedrive-api.js:76:13)
at async SyncTargetOneDrive.initFileApi (D:\Users\jose\AppData\Local\Programs\Joplin\resources\app.asar\lib\SyncTargetOneDrive.js:74:18)
at async SyncTargetOneDrive.fileApi (D:\Users\jose\AppData\Local\Programs\Joplin\resources\app.asar\lib\BaseSyncTarget.js:73:19)
at async SyncTargetOneDrive.initSynchronizer (D:\Users\jose\AppData\Local\Programs\Joplin\resources\app.asar\lib\SyncTargetOneDrive.js:83:38)
at async SyncTargetOneDrive.synchronizer (D:\Users\jose\AppData\Local\Programs\Joplin\resources\app.asar\lib\BaseSyncTarget.js:109:26)
at async Object.shared.synchronize_press (D:\Users\jose\AppData\Local\Programs\Joplin\resources\app.asar\lib\components\shared\side-menu-shared.js:104:10)
at async SideBarComponent.sync_click (D:\Users\jose\AppData\Local\Programs\Joplin\resources\app.asar\gui\SideBar.min.js:418:3)”

Are you using OneDrive for Business? It is currently not supported.

Yes it’s the OneDrive provided with Office365.
Is there any work around?

No, unfortunately Microsoft made the OneDrive Business API entirely different and incompatible with regular OneDrive, so there’s currently no work around.

I made it work by adding a OneDrive account. Fortunately OneDrive and OneDrive for Business can run side by side.
Thank you Johnny and Laurent for your help.

1 Like

How do you mean that? They are mentioned together in the docs for the Microsoft Graph API.

You are right that the OneDrive for Business and OneDrive Personal API have some differences but all in all they are very similiar. That’s why I have made a PR in Github for adding support for OneDrive for Business (PR is still work in progress but almost done).

2 Likes

Are there any other problems with OneDrive? Dropbox is too expensive (10/month)
and I don't need 2TB space. Onedrive is (2/m) for 100 GB.

Currenty my Jex is 500 Mb but I am afraid it is going to get alot bigger with images.
I try to shrink the images but it is too much work.

Dropbox doesn't have a free plan anymore? I've just checked my account and it still works but if I look at the plan page it doesn't look like there's a free option, or am I missing something?

2 Likes

Yes of course, I am now in the free plan of dropbox with 2GB.
I think I will reach the limit in a few months. Also although I store some staff in .jex files, I noticed the drobox used size stayed the same and keeps rising.

1 Like

The app will also sync revisions, which will grow over time. You can reduce how many days you want to keep revisions in the settings.

2 Likes