Rename Team Name In Teams To Shorten OneDrive Path Lengths

If you have issues with long path’s in OneDrive when you sync teams sharepoint document libraries locally you need a way to shorten them. Previously this has been a real pain but now its pretty painless.

See here I have a team with a really long name and I’ve created a file and folder in it.

Here I sync it down using OneDrive but folder paths are really long and this can cause problems with files not saving and sometimes programs crashing due to the Windows file path length restriction.

To resolve this login to your tenant as a Global admin. Go into Admin then into the SharePoint admin center.

From there click on Sites->Active Sites and click on the team site you need to rename. Under URL click on Edit.

Chose a new name for the Team and save the changes.

Click yes to continue and change the name of the site.

Now use the exact same name used in the step above to change the site name and save it.

After a few seconds the Site name and URL will update.

At this point if you go into Teams it will start to break but this is normal. In my tests it takes anywhere from 2 minutes to 2 hours for everything to sort itself out.

A few minutes later and teams is back working normally again and now with the new shorter name!

You can see here SharePoint is loading up fine too.

Next I create a new document and even though I’ve not changed anything in OneDrive yet it’s still syncing changes.

Same for new folders.

Now we need to update OneDrive so that it registers the new Team / Site name. It would appear that OneDrive uses site GUID’s to identify and sync the files and folders so changing the name in Teams doesnt break OneDrive.

In this test we are going to stop syncing the Team because we want it to use the shorter name.

Go into the settings of OneDrive on your computer and into the Account tab. In there click Stop sync next to the old team name. Press ok and wait for OneDrive to stop syncing.

One it stops syncing the cloud symbols will disappear and then you can delete the old folder or to be safe cut and paste it elsewhere.

Now I create a few more test folders and documents in teams and click the Sync button to resync OneDrive.

After a few minutes OneDrive has synced down the files and folders and now uses the shorter Team name.

Hope you found this useful! if you did please leave a nice comment below.

Author: Ian@SlashAdmin

Share This Post On
468 ad

1 Comment

  1. And if you don’t need to shorten the pathname, you can use the Long Path Tool or Gs RichCopy 360, this is my advice

    Post a Reply

Submit a Comment

Your email address will not be published.