Copy Files Between OneDrive and SharePoint with rclone
You can use rclone to copy files between OneDrive and SharePoint. First configure a remote for each storage location with rclone config, then make sure the account used by rclone can access both locations.
For example, if your remotes are named YourOneDrive and YourSharePoint, run:
rclone copy YourOneDrive:/ YourSharePoint:/ --server-side-across-configs -vv
The current general-purpose flag is --server-side-across-configs. Older OneDrive-specific examples use --onedrive-server-side-across-configs, which is deprecated. The flag lets rclone attempt server-side operations across configurations. Whether Microsoft can perform the copy on its servers depends on the accounts and storage involved. For example, rclone documents support for OneDrive for Business and SharePoint when the user has access to both under the same tenant. If server-side copy is unavailable, rclone falls back to a regular copy, which transfers data through the machine running rclone and may take longer.
See the current rclone documentation for OneDrive server-side operations and the general --server-side-across-configs option for the supported cases and limitations.