Rclone Enhancement: Intelligent Tenant-Based Routing for OneDrive Transfers

Hey Rclone community,

I want to propose an additional feature that could intelligently detect tenant boundaries and route files efficiently across tenants using existing OneDrive mounts.

Current Issue

Right now, when transferring files between OneDrive accounts:

  • Same Tenant: Rclone downloads and re-uploads files even though Microsoft allows direct internal moves, which would be much faster.
  • Different Tenants: If transferring across different tenants, there is no optimized routing—the file is manually uploaded instead of using the fastest available path.

Proposed Solution: Intelligent Tenant-Based Routing

1. Optimize Transfers Within the Same Tenant

  • If both OneDrive accounts are in the same Microsoft 365 tenant, Rclone should detect this and use Microsoft Graph API’s internal move function, avoiding unnecessary uploads.

2. Optimize Transfers Between Different Tenants

If the file needs to move to a different tenant, Rclone should:

  • Check for any existing mounts from the destination tenant.
  • If the exact destination account is not mounted, find and use any available account within that tenant to act as an intermediary relay.
  • Move the file at high speed within the same tenant first, and then let OneDrive handle the final transfer to the target account.

Example Workflow

Scenario 1: Moving a File Within the Same Tenant (Fast Transfer via Graph API)

  • Source: aaa.bbb.onmicrosoft.com
  • Destination: bbb.bbb.onmicrosoft.com (same tenant)
  • :white_check_mark: Rclone detects same tenant → Uses OneDrive’s built-in move API → Instant transfer (no re-uploading needed).

Scenario 2: Moving a File to a Different Tenant Without a Direct Mount

  • Source: aaa.bbb.onmicrosoft.com
  • Destination: aaa.ccc.onmicrosoft.com (different tenant)
  • Available Accounts in ccc.onmicrosoft.com: ddd.ccc.onmicrosoft.com, eee.ccc.onmicrosoft.com, fff.ccc.onmicrosoft.com
  • :white_check_mark: Rclone routes the file to one or multiple of these intermediary accounts.
  • :white_check_mark: From there, the file is transferred at high speed to aaa.ccc.onmicrosoft.com using OneDrive’s internal move API.
  • This is still faster than uploading directly between different tenants.

Why This is Beneficial

:white_check_mark: Reduces bandwidth usage by avoiding unnecessary re-uploads.
:white_check_mark: Bypasses API rate limits by leveraging OneDrive’s internal transfer functionality.
:white_check_mark: Optimizes cross-tenant file movement without requiring direct access to every OneDrive account.
:white_check_mark: Uses intermediary accounts dynamically rather than requiring all accounts to be manually added.

Could you explain what is the difference of your post vs using --server-side-across-configs in your command?