When migrating files to OneDrive for Business, some files may fail to upload with an error related to unsupported metadata. This typically occurs when files contain custom property sets, extended file attributes, or NTFS alternate data streams that OneDrive does not recognize. This article explains what metadata OneDrive blocks, why it causes migration failures, and how to remove or bypass unsupported metadata so your migration completes successfully.
Key Takeaways: Fixing OneDrive Migration Failures from Unsupported Metadata
- Windows File Explorer > File Properties > Details > Remove Properties: Use this built-in tool to strip custom metadata (tags, comments, authors) from individual files or folders.
- PowerShell Remove-Item cmdlet on alternate data streams: Run
Remove-Item -Path \"file:Zone.Identifier\"to delete ADS entries that OneDrive blocks. - OneDrive admin center > Sync > File types allowed: Configure tenant-wide settings to block specific file extensions or metadata-heavy formats before migration begins.
Why OneDrive Blocks Files With Unsupported Metadata
OneDrive for Business stores files in SharePoint Online, which enforces strict metadata limits. Files that carry custom Document Properties, extended file attributes, or NTFS alternate data streams often trigger upload failures. The root cause is that SharePoint Online cannot index or store metadata that falls outside the standard Office Open XML or basic file system property sets. Common culprits include files migrated from on-premises SharePoint farms, legacy document management systems, or applications that embed custom property schemas into Office documents. OneDrive returns error codes such as 0x80070057, 0x80004005, or a generic “The file contains unsupported metadata” message when it encounters these files.
What Types of Metadata Are Unsupported
OneDrive blocks three categories of metadata:
- Custom Document Properties: Properties added via File > Info > Properties > Advanced Properties in Office applications. Examples include custom fields like “Project Code” or “Department ID” that are not part of the built-in property set.
- NTFS Alternate Data Streams: Hidden streams attached to files, often created by web downloads (Zone.Identifier), antivirus tools, or backup software. OneDrive cannot process these streams.
- Extended File Attributes: Attributes set by third-party file management systems, including custom tags, ratings, or comments stored outside the standard NTFS attribute set.
Steps to Identify and Remove Unsupported Metadata Before Migration
Follow these steps to scan and clean files before migrating them to OneDrive. Perform these steps on a copy of the source data to avoid data loss.
- Open File Properties in Windows Explorer
Right-click a file that failed migration and select Properties. Go to the Details tab. Review the list of properties. Any property with a value under “Custom” or “Other” may be unsupported. Click Remove Properties to strip custom metadata. - Use PowerShell to List Alternate Data Streams
Open PowerShell as Administrator. RunGet-Item -Path "C:\path\to\file.docx" -Streamto list all ADS entries. If the output includes streams like:Zone.Identifieror:Oplock, these are unsupported. Remove them withRemove-Item -Path "C:\path\to\file.docx:Zone.Identifier". - Strip Custom Properties From Multiple Files
Use theDocumentFormat.OpenXmllibrary in PowerShell to remove custom properties from Office files. Example script:$doc = Open-XmlPackage -Path "file.docx"; $doc.DeletePart("CustomFilePropertiesPart"); $doc.Save(). This removes all custom property sets. - Run OneDrive Migration Pre-Check Tool
Download the SharePoint Migration Tool from the Microsoft 365 admin center. Run the pre-check scan on the source folder. The tool lists files with unsupported metadata and provides a report. Review the report and clean flagged files using the steps above. - Retry the Migration
After cleaning, upload the files again using the SharePoint Migration Tool or OneDrive sync client. Monitor the migration dashboard for errors. If the same file fails, inspect it again with the PowerShell stream listing command.
If OneDrive Migration Still Fails After Cleaning Metadata
OneDrive Sync Client Shows “Processing Changes” Indefinitely
This can happen when a file has a hidden ADS that the Remove-Item cmdlet did not delete. Run Get-Item -Path "file.docx" -Stream again. If streams remain, delete each one individually. Then restart the OneDrive sync client by right-clicking the OneDrive icon in the system tray and selecting Pause syncing, then Resume syncing.
SharePoint Migration Tool Reports “Metadata Limit Exceeded”
SharePoint Online has a 30,000-character limit on combined metadata per file. Files with many custom properties or long text values may exceed this limit. Open the file in the native Office application. Go to File > Info > Properties > Advanced Properties. Delete any custom properties with large text values. Save and re-upload.
Files Migrate But Metadata Is Missing
OneDrive does not preserve custom properties that are unsupported. After migration, verify that built-in properties such as Title, Author, and Last Modified are intact. If custom properties are critical, consider storing them in SharePoint columns instead of file metadata. Create a SharePoint document library with custom columns and map the values during migration using the SharePoint Migration Tool column mapping feature.
Built-in Metadata vs Custom Properties: What OneDrive Preserves
| Item | Built-in metadata (preserved) | Custom properties (not preserved) |
|---|---|---|
| Description | Standard Office properties: Title, Author, Subject, Keywords, Comments, Last Saved By | User-defined fields added via Advanced Properties in Office apps |
| Storage method | Stored in the Office Open XML package (docProps/core.xml) | Stored in a separate custom XML part (docProps/custom.xml) |
| OneDrive behavior | Indexed and searchable in SharePoint Online | Blocked during upload; file fails with error |
| Migration tool handling | Preserved automatically | Must be removed or mapped to SharePoint columns before migration |
OneDrive for Business preserves all built-in document properties defined by the Office Open XML standard. Custom properties that are not part of this standard are rejected. If you need custom metadata, create SharePoint columns in the target document library and map the values during migration. This approach avoids upload failures and keeps your metadata accessible.