mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-16 12:45:14 +02:00
* Rename Office365.md --> SharePoint-Shared-Libraries.md which better describes this document
2.6 KiB
2.6 KiB
How to configure OneDrive SharePoint Shared Library sync
Syncing a OneDrive SharePoint library requires additional configuration for your 'onedrive' client:
- Login to OneDrive and under 'Shared Libraries' obtain the shared library name
- Query that shared library name using the client to obtain the required configuration details
- Create a unique local folder which will be the SharePoint Library 'root'
- Configure the client's config file with the required 'drive_id'
- Test the configuration using '--dry-run'
- Sync the SharePoint Library as required
Listing available OneDrive SharePoint Libraries
- Login to the OneDrive web interface and determine which shared library you wish to configure the client for:
Query that shared library name using the client to obtain the required configuration details
- Run the following command using the 'onedrive' client
onedrive --get-O365-drive-id '<your library name>'
This will return something similar to the following:
Configuration file successfully loaded
Configuring Global Azure AD Endpoints
Initializing the Synchronization Engine ...
Office 365 Library Name Query: <your library name>
SiteName: <your library name>
drive_id: b!6H_y8B...xU5
URL: <your site URL>
Configure the client's config file with the required 'drive_id' & 'sync_dir' options
- Create a new local folder to store the SharePoint Library data in
mkdir ~/SharePoint_My_Library_Name
Note: Do not use spaces in the directory name, use '_' as a replacement
Update your 'onedrive' configuration file (~/.config/onedrive/config
) with the following:
sync_dir = "~/SharePoint_My_Library_Name"
- Once you have obtained the 'drive_id' above, add to your 'onedrive' configuration file (
~/.config/onedrive/config
) the following:
drive_id = "insert the drive_id value from above here"
The OneDrive client will now be configured to sync this SharePoint shared library to your local system.
Note: After changing drive_id
, you must perform a full re-synchronization by adding --resync
to your existing command line.
Test the configuration using '--dry-run'
- Test your new configuration using the
--dry-run
option to validate the the new configuration
Sync the SharePoint Library as required
- Sync the SharePoint Library to your system with either
--synchronize
or--monitor
operations
How to configure multiple OneDrive SharePoint Shared Library sync
Refer to ./advanced-usage.md for configuration assistance.