Skip to content
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 for business #254

Closed
rogerfar opened this issue Dec 18, 2015 · 69 comments
Closed

OneDrive for business #254

rogerfar opened this issue Dec 18, 2015 · 69 comments

Comments

@rogerfar
Copy link

I couldn't figure out from the docs, but is the OneDrive implementation the for business one or the consumer one?

@ncw
Copy link
Member

ncw commented Dec 18, 2015

It only does the consumer one at the moment.

Unfortunately I don't have a onedrive for business account, but it should be relatively straight forward to make it work.

Do you have a onedrive for business account? Would you be willing to do some testing?

@rogerfar
Copy link
Author

Yeah I have a Office 365 account. We are currently migrating from Dropbox to Office 365 for business.

Let me know if you want me to do some testing.

@ncw
Copy link
Member

ncw commented Dec 18, 2015

Thanks. I'll let you know!

@skelluk
Copy link

skelluk commented Jan 25, 2016

Hi, I'm also very interested in this and can provide an account if needed.

Thanks!

@ncw
Copy link
Member

ncw commented Jan 25, 2016

@skelluk an account I could use would help enormously (I only have the free onedrive account!). Email me offline at [email protected] - Thanks

@ncw ncw added this to the Unplanned milestone Feb 10, 2016
@rafareino
Copy link

Also interested and willing to help with tests, but I will need to have access to any source code before executing it.

@ncw
Copy link
Member

ncw commented Feb 17, 2016

@rafareino a onedrive for business account I could use would be really helpful! The source code for rclone is all on this site - it is a fully open source project.

@rafareino
Copy link

Sadly enough, I can't provide you with access to one business account

Rafael Reinoldes
[email protected]

"Experience is not what happens to a man; it is what a man does with what
happens to him." (Aldous Huxley, Texts and Pretexts - 1932)

On Wed, Feb 17, 2016 at 10:57 AM, Nick Craig-Wood [email protected]
wrote:

@rafareino https://github.com/rafareino a onedrive for business account
I could use would be really helpful! The source code for rclone is all on
this site - it is a fully open source project.


Reply to this email directly or view it on GitHub
#254 (comment).

@jestallin
Copy link

+1

@aspillai
Copy link

I can provide my account for testing. Please contact me through private message for the account information and password. I can also do some testing if that'll be helpful.

@ncw ncw modified the milestones: v1.31, Unplanned / Help Wanted Jun 13, 2016
@ncw ncw modified the milestones: v1.32, v1.31 Jul 11, 2016
@dewoller
Copy link

+1

@marrco
Copy link

marrco commented Jul 18, 2016

I can provide an account for testing too, and i'm willing to help with test.

@ncw ncw modified the milestones: v1.32, v1.33 Jul 18, 2016
@philthynz
Copy link

+1

@ncw ncw modified the milestones: v1.34, v1.33 Aug 18, 2016
@te1000
Copy link

te1000 commented Aug 19, 2016

+1
I also can provide an account or do some tests

@alexpdp7
Copy link

alexpdp7 commented Sep 1, 2016

+1, volunteer for testing

@stevenvandervalk
Copy link

Happy to test as well, came here immediately after noticing the OAuth is consumer only. Thanks for the project!

@GrahamCobb
Copy link

Also interested to test (but can't provide an account, unfortunately).

ncw pushed a commit that referenced this issue Sep 12, 2017
- 2 test fail (MimeType and modification date when copying)
- no headless setup
- uses the credentials for the "rclonetest" app I have created
@ncw
Copy link
Member

ncw commented Sep 12, 2017

I've merged @olihey 's excellent work now - please have a go with it and report back!

https://beta.rclone.org/v1.37-130-gf91f89d4/ (uploaded in 15-30 mins)

@egorian
Copy link

egorian commented Sep 14, 2017

Thanks for the update. I've been testing the Beta v.1.37 and although it works fine connecting to an O365 Business Account, it only works for an hour (the Access Token duration). Is it implemented the procedure to use the Refresh Token to renew the Access Token once is expired?

@olihey
Copy link
Contributor

olihey commented Sep 15, 2017

I haven't done anything special about the token refreshing and when I just tried it (haven't used rclone for days) I got:
C:\Users\olihey\Documents\go\src\github.com\ncw\rclone>go run rclone.go -v -v lsd odb:/
2017/09/15 07:37:32 DEBUG : rclone: Version "v1.37-DEV" starting with parameters ["C:\Users\olihey\AppData\Local\Temp\go-build290033266\command-line-arguments\_obj\exe\rclone.exe" "-v" "-v" "lsd" "odb:/"]
2017/09/15 07:37:32 DEBUG : One drive root '': Token expired but no uploads in progress - doing nothing
2017/09/15 07:37:32 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
2017/09/15 07:37:32 DEBUG : odb: Saved new token in config file

Did you ran rclone for over an hour?

@ncw
Copy link
Member

ncw commented Sep 15, 2017

@egorian @olihey the token refreshing should be working fine.

I tested it by uploading 1000 files using --tpslimit 0.3 so they went very slowly.

I can see the token being refreshed

2017/09/15 12:38:07 DEBUG : One drive root '1000files': Token expired - 4 uploads in progress - refreshing
2017/09/15 12:38:26 DEBUG : One drive root '1000files': Token refresh successful

And it ran for > 2hr.

@maroc81
Copy link

maroc81 commented Sep 16, 2017

I just tested this and so far is working great. You guys rock!

@kz0
Copy link

kz0 commented Sep 17, 2017

I've been trying the beta version and came across the following error:

2017/09/17 18:26:00 Failed to copy: invalidRequest: One of the provided arguments is not acceptable.

Using rclone copy src dst -v --exclude '*DS_Store*'´

@olihey
Copy link
Contributor

olihey commented Sep 17, 2017

Is this related to the OneDrive for Business or are you having the issue in general?

@benad
Copy link

benad commented Sep 17, 2017

Works for me with rclone copy, ls and cat.

I'm getting WriteFileHandle.Write error: io: read/write on closed pipe when trying to write to a file with rclone mount. Reading files with --read-only works fine.

@kz0
Copy link

kz0 commented Sep 17, 2017

@olihey Just receive this error with OneDrive for Business.

@priccis
Copy link

priccis commented Sep 17, 2017

@benad rclone mount is experimental and is only reliable to use for reading. Writing has issues in all providers as far as I know.

@priccis
Copy link

priccis commented Sep 17, 2017

@kz0 You can try with this: rclone -v copy src dst --exclude '*DS_Store*'´

@kz0
Copy link

kz0 commented Sep 17, 2017

Same problem, this only happens with one specific file when copying to onedrive remote encrypted.

Failed to copy: invalidRequest: One of the provided arguments is not acceptable. 2017/09/18 00:06:37 ERROR : Attempt 3/3 failed with 1 errors and: invalidRequest: One of the provided arguments is not acceptable. 2017/09/18 00:06:37 Failed to copy: invalidRequest: One of the provided arguments is not acceptable.

@arionl
Copy link

arionl commented Oct 12, 2017

I'm also seeing this problem. In the process of doing a large sync of a local directory to an OneDrive remote with a crypt layer on top I'm seeing two types of errors:

2017/10/12 11:33:05 ERROR : <REDACTED>: Failed to copy: failed to make directory: invalidRequest: One of the provided arguments is not acceptable.

and

2017/10/12 11:33:15 ERROR : <REDACTED>: : Failed to copy: invalidRequest: One of the provided arguments is not acceptable.

After inspecting the files, I don't see anything peculiar about them. These are mostly folders full of PDF documents and where one PDF document may sync fine, another one doesn't. I'll try to run with higher debug levels to collect more data after my first pass at this large sync completes.

EDIT:

$ rclone --version
rclone v1.38
- os/arch: freebsd/amd64
- go version: go1.9

@arionl
Copy link

arionl commented Oct 23, 2017

I passed my source directory through a local crypt remote config (i.e., local filesystem mount using crypt config in clone) and that worked fine to encrypt everything (no errors, besides a few NOTICE messages I expected about filenames with control characters). I then tried to rclone sync the resulting crypt directory to a OneDrive for Business remote. I got a number of ERRORs just like I did when I was trying to do crypt directly overtop my OneDrive remote. Looking at the failed files/paths, it looks like they are coming up against the path length limit. According to this Microsoft article the limit is 400 characters. Here's an example of one of my crypt'd pathnames:

3namphmk6gie5kf5lov1b1pga0/iive1autrkjre191r8t0v5i5co/257tht6m3mla5f6j8fghsidtrc/34jmqeved763smrlbh2ad0eits/01puc69oqur7vbtmr41tdkmnsufos2r9c1arcgdfd9n7r2hsidv0/3e5k7l15cb8ab0k2b2q4fpf7hk/4elhklo3bp5a708ld72q2pdm9q4ft1vp47o5cpr0700cg22q2fpbld1pku1vk07vbtcpm83go2jnd5h0sg0v0iu897hr7etcaga7prhbqf5370dj1i6q6if2350hdn2rcgn61j7cpvk1oqqirgks3cdtpa43pongj8gs3qqkd3btkag7b815a2r1c26a53ucbkkobr46bhqhk

"filename" length is 206 character and total path length is 393. Perhaps this is to close to the 'official' 400 character limit? Any other guesses? I'll keep digging..

@hi2u
Copy link

hi2u commented Oct 24, 2017

I’ve been able to successfully connect to the default https://orgname-my.sharepoint.com/ personal SharePoint Site.

But I’m having difficultly figuring out how to connect to team sites on URLs such a: https://orgname.sharepoint.com/ and https://orgname.sharepoint.com/sites/Site-Name etc.

The “rclone config” guided process doesn’t let you set the resource_url when setting it up. So I’ve tried editing ~/.config/rclone.conf using a few different methods (including with and without "Shared Documents" in various formats to cater for the stupid space between the words) to change the resource_url and reauthorize, I always get the error:

Failed to create file system for "sptest:": failed to get root: 401 Unauthorized:

Does anyone know how I access team SharePoint sites?

@maroc81
Copy link

maroc81 commented Nov 7, 2017

Does anyone know how I access team SharePoint sites?

I now find myself needing to do the same thing. Have you made any progress? One thing I noticed, if you click the "Sync" button is will give you an URL like

grvopen://https_58_47_47orgname_46sharepoint_46com_47sites......

Maybe that URL will work (obviously with the microsoftized url encoded parameters converted back to text)?

@olihey
Copy link
Contributor

olihey commented Nov 7, 2017

Have a look at #1770 if the beta version let you select the Sharepoint side

@luisfavila
Copy link

Is there any way to get OneDrive for Business to refresh tokens automatically? It's not useful at all if they keep expiring and we have to re-issue.

@olihey
Copy link
Contributor

olihey commented Mar 8, 2018

@luisfavila I never had any problems with the refresh tokens. Can you share some logs?
Also be aware that Microsoft is a bit special and some restrictions might apply from your organization. I know from some companies that required new tokens every 24 hours.

@ncw
Copy link
Member

ncw commented Mar 10, 2018

Also make sure you try with the latest beta!

@ncw
Copy link
Member

ncw commented Apr 20, 2018

I'm going to close this issue now since onedrive for business and sharepoint have been working with rclone for some time now :-)

@ncw ncw closed this as completed Apr 20, 2018
@ncw ncw removed this from the Soon milestone Apr 21, 2018
@luisfavila
Copy link

Im sorry for answering so late. What I meant was even though if I manually authorize via rclone authorize "onedrive", it never saves the refresh_token. I get a JSON with access_token, refresh_token, token_type and expiry, but once I paste the information it somehow converts the access_token and doesn't save the refresh_token.

@ncw
Copy link
Member

ncw commented May 13, 2018

@luisfavila Not sure what is going on here... Have you tried the copying the config method of configuration?

@luisfavila
Copy link

@ncw I did, but when I add onedrive on my local computer it also ignores the refresh_token

@Alandougherty
Copy link

I passed my source directory through a local crypt remote config (i.e., local filesystem mount using crypt config in clone) and that worked fine to encrypt everything (no errors, besides a few NOTICE messages I expected about filenames with control characters). I then tried to rclone sync the resulting crypt directory to a OneDrive for Business remote. I got a number of ERRORs just like I did when I was trying to do crypt directly overtop my OneDrive remote. Looking at the failed files/paths, it looks like they are coming up against the path length limit. According to this Microsoft article the limit is 400 characters. Here's an example of one of my crypt'd pathnames:

3namphmk6gie5kf5lov1b1pga0/iive1autrkjre191r8t0v5i5co/257tht6m3mla5f6j8fghsidtrc/34jmqeved763smrlbh2ad0eits/01puc69oqur7vbtmr41tdkmnsufos2r9c1arcgdfd9n7r2hsidv0/3e5k7l15cb8ab0k2b2q4fpf7hk/4elhklo3bp5a708ld72q2pdm9q4ft1vp47o5cpr0700cg22q2fpbld1pku1vk07vbtcpm83go2jnd5h0sg0v0iu897hr7etcaga7prhbqf5370dj1i6q6if2350hdn2rcgn61j7cpvk1oqqirgks3cdtpa43pongj8gs3qqkd3btkag7b815a2r1c26a53ucbkkobr46bhqhk

"filename" length is 206 character and total path length is 393. Perhaps this is to close to the 'official' 400 character limit? Any other guesses? I'll keep digging..

I found this was my issue. Also using sync to crypt directory in OD. Reducing the length of the original filename removed the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests