After a user migration in Microsoft 365, shortcut links that were shared from OneDrive for Business often stop working. Recipients see a broken link error or a blank page instead of the expected file or folder. This happens because the underlying file ID or sharing token changes when the file owner’s identity is moved to a new tenant or a new user account. This article explains why the links break and provides a step-by-step method to restore access to all affected shared links.
Key Takeaways: Recovering Broken Shortcut Links After a User Migration
- Microsoft 365 admin center > Users > Active Users: Use the user migration tool or a cross-tenant migration script to reassign OneDrive file ownership so that existing sharing permissions are preserved.
- OneDrive > Settings > Sync and backup > Manage backup: After migration, re-link the user’s OneDrive to the new account by signing out and signing back in, which refreshes the sharing tokens.
- PowerShell cmdlet Set-SPOTenant -SyncAadB2BManagementPolicy: Configure tenant-level settings to allow B2B guest access to shared files after a cross-tenant migration, preventing broken links for external recipients.
Why Shortcut Links Break After a User Migration
When a user is migrated from one Microsoft 365 tenant to another, or when a user’s identity is moved to a new domain or account, every OneDrive file and folder receives a new unique identifier. The sharing links that were created before the migration point to the old identifier. After migration, the old identifier no longer exists, so the link resolves to an error.
Microsoft 365 uses a combination of the tenant ID, the user’s object ID, and the file’s GUID to generate a sharing link. If any of these components change, the link breaks. Common migration scenarios that cause this include:
- Cross-tenant migration where users move to a different Microsoft 365 organization.
- Domain change where the user’s primary email address and UPN are updated.
- Merging two tenants into one, which reassigns all user object IDs.
- Manual re-creation of user accounts in the same tenant with a different object ID.
The broken link issue affects both internal recipients within the same tenant and external recipients who were granted guest access. External users lose access entirely because the B2B collaboration token is invalidated.
Steps to Restore Broken Shortcut Links After Migration
Method 1: Reassign OneDrive Ownership Before Migration
The most effective fix is to transfer OneDrive file ownership to the new user account before the migration is finalized. This method preserves the original sharing links because the file IDs remain unchanged. Perform these steps in the source tenant before migrating the user.
- Open the Microsoft 365 admin center
Sign in with a Global Administrator or SharePoint Administrator account. Navigate to Users > Active Users. - Select the user being migrated
Click the user’s display name to open the details panel. Under the OneDrive tab, click Create link to files. This generates a direct URL to the user’s OneDrive root folder. - Access the user’s OneDrive as the source admin
Open the generated link in a new browser tab. You will see the user’s files and folders. Click Settings (gear icon) and select OneDrive settings. Under Sync and backup, choose Manage backup to verify the folder structure. - Use PowerShell to transfer ownership
Run the SharePoint Online Management Shell as an administrator. Execute the following cmdlet to set a new owner for the user’s OneDrive site:Set-SPOSite -Identity https://yourtenant-my.sharepoint.com/personal/olduser_domain_com -Owner newuser@domain.com
Replace the URL with the user’s actual OneDrive URL and the owner with the new user’s email address. - Verify the ownership transfer
RunGet-SPOSite -Identity https://yourtenant-my.sharepoint.com/personal/olduser_domain_com | fl Ownerto confirm the new owner is listed. All sharing links created by the original user now point to files owned by the new user, and the links remain functional.
Method 2: Recreate Sharing Links After Migration
If the migration has already occurred and links are broken, you must manually recreate the sharing links. This method requires the new owner to access the files and re-share them.
- Sign in as the new user
The migrated user should sign in to OneDrive using their new credentials. Open the OneDrive sync client or the web interface at https://www.office.com and navigate to OneDrive. - Locate the files that had broken links
Browse to the folder or file that was previously shared. If the file structure is intact, the files will be present. If files are missing, contact your IT administrator to restore them from the previous user’s OneDrive. - Generate new sharing links
Right-click the file or folder and select Share. Choose the appropriate permission level (Edit or View). Click Copy link to generate a new sharing URL. Send this link to all recipients who need access. - Remove old broken links
To prevent confusion, delete the old sharing links. Go to the file, click Share, and then click Manage access. Remove any links that show an error or that were created before the migration.
Method 3: Use Cross-Tenant Migration Tools
For large-scale migrations involving many users, Microsoft provides the Cross-tenant OneDrive migration tool in the SharePoint admin center. This tool preserves sharing links by maintaining file IDs across tenants. To use it:
- Open the SharePoint admin center
Sign in with a Global Administrator account. Go to Admin centers > SharePoint. - Navigate to Migration
In the left menu, click Migration and then select Cross-tenant migration. - Create a migration batch
Click New batch. Select the source and target tenants. Enter the user’s email address in both tenants. The tool will map the user’s identity and transfer OneDrive content while preserving the file IDs. - Run the migration
After the batch is configured, click Run. The migration may take several hours depending on the amount of data. Once completed, all sharing links remain functional.
If Shortcut Links Still Break After the Main Fix
External recipients see “Access Denied” after migration
External users who were granted guest access before the migration lose their B2B collaboration token. To fix this, the new owner must re-invite the external users. In OneDrive, open the shared file, click Share > Manage access, and add the external user’s email address again. The user will receive a new invitation email. After accepting, the link will work.
OneDrive sync client shows “This file is no longer shared”
When a user migration changes the file owner, the sync client may detect the old sharing link as invalid. The user should sign out of the OneDrive sync client on their computer and sign back in. Right-click the OneDrive cloud icon in the system tray, select Settings > Account > Unlink this PC. Then sign in with the new credentials. This refreshes the sync relationship and resolves the broken link status.
PowerShell shows “Site does not exist” when trying to access the old OneDrive
If the old user’s OneDrive site was deleted during migration, the files are gone. Check the SharePoint admin center under Sites > Deleted sites. If the site is there, restore it. Then transfer ownership as described in Method 1. If the site is permanently deleted, you must restore files from a backup or recycle bin within 93 days of deletion.
Sharing Link Types: User-Specific vs Anonymous Links
| Item | User-Specific Link (People in your organization) | Anonymous Link (Anyone with the link) |
|---|---|---|
| Description | Link that grants access only to authenticated users in the same tenant | Link that grants access to anyone, no sign-in required |
| Breaks after migration | Yes, if the user’s object ID changes | Yes, because the file ID changes |
| Fix method | Reassign ownership before migration or recreate the link after migration | Recreate the link after migration |
| External recipient recovery | Requires re-invitation via new link | Requires a new anonymous link |
Shortcut links break after a user migration because the file’s unique identifier changes. The most reliable fix is to transfer OneDrive ownership to the new user before the migration. If the migration has already happened, you must recreate the sharing links manually. Use the cross-tenant migration tool in the SharePoint admin center for large migrations to preserve links automatically. After restoring links, ask recipients to test access and report any errors so you can re-invite external users.