-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onedrive: Onedrive Business Support for organizations in an unamanged state (mostly universities) #1975
Comments
@olihey Can you shed any light on this? I have to say I find the innumerable ways of authenticating to OneDrive very confusing! |
I only have an Office365 account, so I have no chance to look into that.
they are using some Windows libs to get access. |
@hensur Can you please go to this page https://developer.microsoft.com/en-us/graph/graph-explorer, authenticate your account and run the URL: |
@olihey I can't even authenticate on the page, it shows the same error as rclone does in the URL: |
Thanks for trying, seems like you have to kick your IT department. Sorry |
Hi, so in the last months I did some projects in go and now I thought about reviewing the other possibilities to authenticate. I implemented the cookie retrieval in go: I can get a cookie now and it is possible to mount the onedrive account using davfs2 and the retrieved cookie. It probably would be possible to setup a local rclone on this mountpoint, but that's not really my favorite way of solving this. I looked into the rclone sources to find a method to integrate the cookie auth into, but I'm not quite sure where to start. So I thought about here (https://github.com/ncw/rclone/blob/master/backend/webdav/webdav.go#L282) and added a SetCookie method to the rest module which basically does the same as the SetUserPass method (https://github.com/ncw/rclone/blob/master/lib/rest/rest.go#L96) I got a 403 Forbidden response after hardcoding some values in there and trying it with a new webdav endpoint which points to my sharepoint URL. I'd be happy for some help to get started :) |
@hensur that is great! I'm traveling at the moment so I'll be brief. Did you try using --vv with --dump bodies? That will show you exactly what happens to the http requests. Can you show code for what you've done so far? Gotta go now plane doors shutting! |
Hey @ncw! I hope you had a good flight :) I just pushed my changes to my rclone fork: https://github.com/hensur/rclone In the current state I can use my fork to authenticate and somehow list the remote.
|
I had a quick look through that - it is looking very nice :-)
What that means is that the directory itself appeared in the directory listing for the directory. This should be filtered out but that isn't working for some reason - I expect a bit of examination of the Will this code work for any onedrive account? Eg my personal one? Some thoughts about making this into a pull request
Excellent progress - looking forward to seeing the next step :-) |
Just a quick update, I did some testing and I noticed that the error above only happens if i execute I'm currently working on the pull request. I can try to further examine the A normal onedrive Account can be accessed over webdav as well, although the procedure is quite different: https://blogs.msdn.microsoft.com/robert_mcmurray/2014/09/30/using-the-webdav-redirector-with-onedrive-part-1-standard-security/ |
@hensur wrote:
Rclone is supposed to be agnostic about Oh - I see you did that already in your PR :-) Excellent! |
I think this issue is sorted at least for webdav. In the light of #2325 I think there needs to be some documentation in I wonder if rclone can detect the error and print a more helpful error message... |
ok, I'll add the docs. |
Not necessarily the screenshot, but a pointer to what to do if your org turns out to be unmanaged and how you would recognise it. |
@hensur , @ncw When copy from a source file to local,, it has error: |
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:
ArchLinux 4.14.13-1-ARCH #1 SMP PREEMPT Wed Jan 10 11:14:50 UTC 2018 x86_64 GNU/Linux
OneDrive (Office 365 Education)
Returned URL:
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
The text was updated successfully, but these errors were encountered: