-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Description
This topic was discussed at the end of Issue #1577, but as @ncw requested I created a new one for this specific problem.
Many schools don't verify their Office 365 Education Account. This prevents students from authorizing application using the API. Authorization requests return this error:
What is your rclone version (eg output from
rclone -V)
./rclone -V
rclone v1.39-025-g60afda00β
- os/arch: linux/amd64
- go version: go1.9.2
Which OS you are using and how many bits (eg Windows 7, 64 bit)
ArchLinux 4.14.13-1-ARCH #1 SMP PREEMPT Wed Jan 10 11:14:50 UTC 2018 x86_64 GNU/Linux
Which cloud storage system are you using? (eg Google Drive)
OneDrive (Office 365 Education)
The command you were trying to run (eg
rclone copy /tmp remote:tmp)
A log from the command with the
-vvflag (eg output fromrclone -vv copy /tmp remote:tmp)
./rclone authorize onedrive
Choose OneDrive account type?
* Say b for a OneDrive business account
* Say p for a personal OneDrive account
b) Business
p) Personal
b/p> b
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth
Log in and authorize rclone for access
Waiting for code...
2018/01/14 15:50:08 Failed to configure token: failed to get code
Returned URL:
http://localhost:53682/?error=access_denied&error_description=AADSTS65005%3a+Using+application+%27rclone%27+is+currently+not+supported+for+your+organization+*********+because+it+is+in+an+unmanaged+state.+An+administrator+needs+to+claim+ownership+of+the+company+by+DNS+validation+of+***********+before+the+application+rclone+can+be+provisioned.
I already contacted my school, but they don't plan to verify their domain, because it would require them to handle password resets and other stuff by themselves.
However, there seem to be a few workarounds:
I managed to connect duplicati to my Office 365 education account.
I suppose it works because it uses a different onedrive for business/sharepoint implementation.
I had to put in my actual username and password and the server it should connect to (e.g. [universityname]-my.sharepoint.com).
Another way is using webdav, as mentioned by @putiyeb in the original issue:
"The OD4B of your account can be mounted by WebDav, using Cookie to authorize.
See detail:
https://shui.azurewebsites.net/2018/01/13/mount-onedrive-for-business-on-headless-linux-vps-through-webdav/"
Apparently this repo implements a way of getting an onedrive cookie in python and uses a bash script to mount the share using davfs2:
https://github.com/yulahuyed/test