The OneDrive Client for Linux connects your Debian or Ubuntu system to Microsoft’s OneDrive Personal, OneDrive for Business, OneDrive for Office365, Sharepoint and other such deployments.
Step 1
Install the OneDrive Client from the Debian or Ubuntu repository.
$ sudo -- bash -c 'apt update && apt install --yes onedrive'
Step 2
Begin to connect the client to your OneDrive account.
$ onedrive --sync
You will be presented with a dialog containing a URI similar to the following:
Configuring Global Azure AD Endpoints
Authorise this application by visiting:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=e50ca730-u81r-1r1m-x381-28l5d9334f0y&scope=Files.ReadWrite%20Files.ReadWrite.All%20Sites.ReadWrite.All%20offline_access&response_type=code&prompt=login&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient
Enter the response uri from your browser:
In a web browser
Open the URI from the previous dialog in a browser and log into your Microsoft account. You can either [Ctrl + Click] the URI in the terminal or copy and paste it into the address bar of your browser.
Upon successful authentication, you will be redirected to a response URI displaying a blank page. Copy the URI from the address bar of your browser.
In the terminal
Paste the response URI into the terminal. The OneDrive Client will connect to your Microsoft account and synchronise your data.
Initializing the Synchronization Engine …
Syncing changes from OneDrive …
Creating local directory:
Downloading file … done.
Uploading differences of ~/OneDrive
Uploading new items of ~/OneDrive
Step 3
After downloading your data to ~/OneDrive, validate the configuration of your client.
$ onedrive --display-config
All done!