onedrived-dev icon indicating copy to clipboard operation
onedrived-dev copied to clipboard

Support for OneDrive for Business

Open xybu opened this issue 8 years ago • 19 comments

... can't do this yet because I don't have a set of client ID and client secret to test the program.

The biggest problem to support ODfB is that onedrived must be approved by the Office365 admin of the organization domain to obtain the client ID and secret...

xybu avatar Jan 15 '17 05:01 xybu

I can't provide you with credentials, but I can test it with my own University account or even try to fix it. Where could I start? You are using the official OneDrive API, right? I think it should work out of the box.

gentakojima avatar Jan 18 '17 20:01 gentakojima

First we need to get the app registered under some Office 365 domain (https://dev.onedrive.com/app-registration.htm#register-your-app-for-onedrive-for-business) to obtain client ID and secret, then need an account under that domain to run the program.

xybu avatar Jan 18 '17 20:01 xybu

Hi Xybu, I may be able to assist as well, I'll shoot you an email.

billhallsb avatar Jan 23 '17 15:01 billhallsb

how was it going? did it work out with Onedrive for Business?

ireuz avatar Jan 24 '17 15:01 ireuz

"First we need to get the app registered under some Office 365 domain (https://dev.onedrive.com/app-registration.htm#register-your-app-for-onedrive-for-business) to obtain client ID and secret, then need an account under that domain to run the program."

I've registered the app with my workplace's Office365 domain. When I run "onedrived-pref account add -b", I just get a placeholder error message.

I have no experience with Python, but I will try to figure out what changes must be made to make this work for me. I would be grateful for any pointers though. In particular, you mention a client ID and a secret: where should I put them?

threepistons avatar Feb 27 '17 15:02 threepistons

I may be able to help. I work in a Technical Position (CS graduate) at a Uni where we make use of Office 365. If you need testers and/or some other help, I am keen. I'm also not too bad with python.

ajcollett avatar Mar 14 '17 13:03 ajcollett

Tekki is able to authenticate against ODfB (business) with onedrive-perl at https://github.com/Tekki/onedrive-perl And he gives details on how ODfb is different at https://github.com/skilion/onedrive/issues/143#issuecomment-285936704

-Hope this helps... P.S. I'm also at a edu and looking for just a simple cli bulk-uploader for linux/mac. Maybe to put in a cronjob passed a list of updated/changed files. Does the authentication expire, and if so what's the timeout?

(P.P.S. The odrive folks have some cli python based utils btw)

dukechem avatar Mar 16 '17 20:03 dukechem

The Python API certainly already have OneDrive for Business support with brief documentations in the README.

A starting point would be to look into onedrived/od_auth.py and work from there.

felixleong avatar Mar 20 '17 14:03 felixleong

I'm implementing the business account support. You can see my fork: https://github.com/derrix060/onedrived-dev

@xybu, I can also help you with is necessary.

derrix060 avatar Apr 26 '17 00:04 derrix060

I think I'm done to add business support. Who have an business account, please go to my project and do the tests, with my account is everything working.

@xybu What do you prefer: to keep this on separate repository or that I merge in another branch?

derrix060 avatar Sep 19 '17 06:09 derrix060

Giving that there is already a non-working business option which returns that "is not yet supported" it would be nice a merge

daviddavo avatar Sep 26 '17 06:09 daviddavo

What's the status of this issue? It seems to me (when reading the comments), that it's only the pull request that is missing. Is there anything I can do to support? :+1:

fgreinus avatar Nov 30 '17 12:11 fgreinus

Hello @fgreinus you can check my repo and test if it's working okay.

derrix060 avatar Nov 30 '17 23:11 derrix060

Hi @derrix060 onedrive-client-perf account authenticated my OneDrive for Bussiness account without any problems. But onedrive-client-perf drive set is unable to recognise my drives and returns empty set. Here is a log:

karol@aasd34:~/onedrive$ bin/onedrive-client-pref drive set Reading drives information from OneDrive server...

All available Drives of authorized accounts:

Account Email Drive ID Type Quota Status


Please enter row number of the Drive to add or modify (CTRL+C to abort):

karolszk avatar Dec 20 '18 06:12 karolszk

Hello @karolszk, please log these results in the project. There is an open issue for this case, and there is a problem with the OneDrive API.

derrix060 avatar Dec 20 '18 22:12 derrix060

OK. But please tell me how to log / debug onedrive-client-pref drive set I don't see any -debug or -verbose option.

karolszk avatar Dec 21 '18 08:12 karolszk

Today I switched to https://www.maketecheasier.com/sync-onedrive-linux/

karolszk avatar Feb 20 '19 08:02 karolszk

Today I switched to https://www.maketecheasier.com/sync-onedrive-linux/

The source repo is here: https://github.com/abraunegg/onedrive

bmaupin avatar Nov 02 '21 16:11 bmaupin

Since it's good to have options, this looks like another promising alternative: https://rclone.org/onedrive/

It looks like it supports OneDrive Personal, OneDrive for Business, and Sharepoint Server. And it supports other backends as well.

bmaupin avatar Nov 03 '21 13:11 bmaupin