I'm migrating data from an on-premises file share to SharePoint Online using the SharePoint Migration Tool (SPMT). However, I'm facing issues due to the 400-character URL length limitation in SharePoint Online. This limitation is preventing the migration of some files and folders with deep directory structures and long names.

Is there a solution or workaround to bypass this 400-character URL limitation while maintaining the same structure on the file share? Any suggestions or recommendations would be greatly appreciated!

1 Answer 1


According to Microsoft's documentation available at https://support.microsoft.com/en-us/office/restrictions-and-limitations-in-onedrive-and-sharepoint-64883a5d-228e-48f5-b3d2-eb39e07630fa#filenamepathlengths, there isn't a direct workaround to bypass the 400-character URL limitation in SharePoint Online. Exceeding these limits will result in error messages.

Given this constraint, the available alternatives involve either shortening file and folder names or breaking down deep directory structures.

  • So, no way achieving the above using a third-party tool or anything else ? Commented May 22 at 5:38
  • Depending on the scope, sometimes it is easier to talk to the responsible business units to move the affected folder hierarchy a little higher or to create a separate library. (not exactly technical solution, but worth the email if we are not talking about just 40 files but 4000 files)
    – Popkornak
    Commented May 23 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.