Skip to content
Storage Providers

OneDrive & SharePoint

Microsoft Graph v1.0 driver for personal OneDrive, OneDrive for Business, and SharePoint document libraries with 320 KiB upload sessions.

The onedrive backend (backend-onedrive) targets Microsoft Graph API v1.0 cleanly across personal Microsoft accounts, OneDrive for Business, and SharePoint Document Libraries (--drive-id), using Entra ID OAuth 2.0 Desktop PKCE loopback.

Setup Recipes#

# Requests Files.ReadWrite.All offline_access User.Read via loopback PKCE
rship auth onedrive od \
  --client-id "<AZURE_APPLICATION_CLIENT_ID>"

rship about od:

Flags Reference (rship auth onedrive)#

FlagDefaultDescription
<REMOTE>—Logical remote name (e.g. onedrive, sp-docs)
--client-idInteractive promptAzure App Registration (Entra ID) Application client_id
--client-secretNoneOptional client secret (omit for public Mobile/Desktop PKCE app registrations)
--drive-id/me/driveExplicit Microsoft Graph drive_id for SharePoint libraries
--scopeFiles.ReadWrite.All offline_access User.ReadCustom Graph OAuth scope string
--access-tokenNoneDirect Graph bearer token for non-interactive automation

Protocol Internals#

  • Strict 320 KiB upload-session geometry: Files <= 4 MiB upload directly; larger files create Graph upload sessions streaming 10 MiB (32 × 320 KiB) aligned fragments (Graph hard ceiling 60 MiB per request).
  • nextExpectedRanges crash-resume: Queries active upload session URLs directly via Graph and resumes precisely at the server's reported nextExpectedRanges byte offset.
  • Async server-side copy: Same-drive copies dispatch Microsoft Graph's async copy endpoint and poll the monitor URL until committed.
  • rclone migration: Existing OneDrive remotes (token, drive_id, drive_type, client_id, client_secret) import with rship config import-rclone.