OneDrive Migration Guide
Migrate OneDrive for Business files, folders, sharing permissions, and file metadata from one Microsoft 365 tenant to another. OneDrive migration preserves folder hierarchy and, where possible, sharing links.
Prerequisites
Source tenant
- Global Administrator or SharePoint Administrator role
- Microsoft 365 Business Standard, E3, or E5 (OneDrive for Business must be licensed)
- OneDrive provisioned for all source users (users must have signed in at least once)
Destination tenant
- Global Administrator or SharePoint Administrator role
- Microsoft 365 licence with OneDrive for Business assigned to all target users
- OneDrive provisioned on destination (users must have signed in at least once, or an admin has force-provisioned their OneDrive)
How to force-provision OneDrive on destination users If users have never signed in, their OneDrive site has not been created. You can provision them via PowerShell:
Connect-SPOService -Url https://yourtenant-admin.sharepoint.com
Request-SPOPersonalSite -UserEmails @("user@yourtenant.com")
Allow 10–15 minutes for sites to provision before starting migration.
Step 1: Register an App in the Source Tenant
- Sign in to portal.azure.com as a Global Administrator on the source tenant.
- Go to Azure Active Directory → App registrations → New registration.
- Name it
Aatrex OneDrive Sourceand click Register. - Copy the Application (client) ID and Directory (tenant) ID.
- Go to Certificates & secrets → New client secret. Set expiry to 12+ months. Copy the Value.
- Go to API permissions → Add a permission → Microsoft Graph → Application permissions and add:
| Permission | Why it is needed |
|---|---|
Files.Read.All | Read all files and folders in OneDrive |
Sites.Read.All | Access OneDrive site metadata and structure |
User.Read.All | Enumerate users and their OneDrive URLs |
- Click Grant admin consent and confirm all rows show Granted.
Step 2: Register an App in the Destination Tenant
- Sign in to portal.azure.com on the destination tenant.
- Create a new app registration named
Aatrex OneDrive Destination. - Copy the Application (client) ID, Directory (tenant) ID, and generate a Client secret.
- Add the following Application permissions:
| Permission | Why it is needed |
|---|---|
Files.ReadWrite.All | Upload files and create folders in OneDrive |
Sites.ReadWrite.All | Create and configure OneDrive site structure |
User.Read.All | Resolve destination users and OneDrive URLs |
- Click Grant admin consent.
Keep original file authors (optional)
By default, migrated files show the Aatrex app as Created By and Modified By. To keep the original authors, Aatrex also writes those fields through the SharePoint API, which only accepts certificate sign-in:
- On the same destination app, go to API permissions → Add a permission → APIs my organization uses → Office 365 SharePoint Online → Application permissions and add
Sites.ReadWrite.All. Grant admin consent. - In Aatrex, open the setup guide for your project and click Download certificate under Keep original file authors. This downloads
aatrex-sharepoint.cer(public key only — the private key stays with Aatrex). - In the destination app, go to Certificates & secrets → Certificates → Upload certificate and upload that file.
Keep the client secret as well: Aatrex still uses it for Microsoft Graph. If you skip these steps, files migrate normally but show the Aatrex app as the author.
Projects connected with Connect with admin consent don't need these steps — Aatrex's own app already has the certificate.
Step 3: Create a Migration Project
- In Aatrex, click Projects → Create Project.
- Select OneDrive Migration as the migration type.
- Enter a project name, source tenant domain, and destination tenant domain.
- Paste the credentials (App ID, Tenant ID, Client Secret) for both tenants on the Credentials step.
- Click Test Connection → Save Project.
Step 4: Discover OneDrive Users
- Open your project and click Scan → Discover Users.
- Aatrex enumerates all users with an active OneDrive in the source tenant and fetches their storage usage.
- The user list populates with the OneDrive URL, File Count, and Size for each user.
Users with a provisioning error or an inactive OneDrive are flagged with a warning. Resolve by force-provisioning their OneDrive and re-running discovery.
Step 5: Map Users
- Click Auto Map to match users by username.
- Review any unmapped users and assign their destination accounts manually.
- Verify the Destination OneDrive URL shown in the user detail panel is correct before starting.
Step 6: Start the Migration
- Select all mapped users and click Migrate.
- Choose a migration mode:
- Full — copies all files and folders.
- Incremental — copies only files added or modified since the last migration run. Use this for delta passes before cutover.
- Configure options:
- Preserve sharing permissions — attempts to recreate internal sharing links in the destination (external shares cannot be migrated).
- Preserve file versions — migrates the last 10 versions of each file (increases migration time).
- Click Start Migration.
Step 7: Monitor Progress
- The Status column tracks each user:
Queued → In Progress → Completed. - Click any user row to see a Migration Log with file counts, skipped files (unsupported types or path-length violations), and errors.
- Files that exceed the 400 MB per-request Graph API limit are chunked automatically.
Step 8: Post-Migration Verification
- Sign in to OneDrive Web on a migrated user account and browse to verify the top-level folder structure.
- Check a folder with known files and confirm file names, sizes, and last-modified dates are correct.
- Test that internally shared folders are accessible to the expected destination users.
- Run a second Incremental pass within 24 hours of cutover to capture any files added or modified during migration.
Common Issues
OneDrive URL not found for a user OneDrive has not been provisioned. Force-provision via PowerShell (see Prerequisites) and re-run discovery.
Files skipped due to path length Windows and SharePoint enforce a 400-character path limit. Files with deeply nested paths are skipped and listed in the Migration Log. Rename or reorganise these folders in the source before retrying.
Sharing permissions not migrating Cross-tenant sharing links cannot be recreated automatically. Internal sharing permissions are migrated for users that exist in both tenants with matching accounts. Review the Skipped Permissions log after migration.
Large files timing out Files over 250 MB are uploaded using resumable upload sessions. If a session times out, Aatrex retries from the last checkpoint automatically.