Fix Cannot Upload a File in Teams Chat after a SharePoint Site Rename
🔍 WiseChecker

Fix Cannot Upload a File in Teams Chat after a SharePoint Site Rename

You try to attach a file in a Teams chat and nothing happens. The file picker opens but the upload fails or the file never appears. This often starts right after someone renames a SharePoint site that hosts the team’s files. The root cause is that Teams still caches the old site URL and tries to upload to a location that no longer exists. This article explains why the rename breaks uploads and gives you step-by-step fixes to restore file sharing in Teams chat.

Key Takeaways: Fix Teams Chat Uploads After a SharePoint Site Rename

  • Teams admin center > Teams > Manage teams > Channels: Check if the channel still points to the old SharePoint site URL.
  • SharePoint admin center > Active sites: Confirm the new site URL and that the site is not in a read-only state.
  • Clear Teams cache: Delete the cached files in %appdata%\Microsoft\Teams to force a fresh site lookup.

ADVERTISEMENT

Why a SharePoint Site Rename Breaks File Uploads in Teams Chat

When you rename a SharePoint site, the site’s URL changes. For example, a site named “Project Alpha” might change from contoso.sharepoint.com/sites/ProjectAlpha to contoso.sharepoint.com/sites/ProjectAlphaNew. Teams stores a reference to the old URL in its cache and in the channel’s file tab configuration. After the rename, Teams tries to upload files to the old URL, which now returns a 404 error or a redirect loop. The upload fails silently or shows an error message.

Another factor is that the Teams client caches site metadata for performance. The cache is stored locally in the user’s profile. When the site URL changes, the cache becomes stale. The client does not automatically refresh the URL because the rename does not trigger a notification to Teams. This is why the problem persists even after you restart Teams.

How Teams Stores the Site URL

Each Teams channel has a corresponding SharePoint document library. The channel’s Files tab points to this library using a URL. When you rename the site, SharePoint updates the library’s URL, but the channel configuration in Teams may not update immediately. The channel still references the old URL until a synchronization occurs. This sync can take up to 24 hours, but sometimes it never happens automatically.

Steps to Fix File Uploads in Teams Chat After a Site Rename

Follow these steps in order. Each step addresses a different part of the problem. Start with the simplest fix and move to the more advanced ones if needed.

  1. Clear the Teams cache
    Close Teams completely. Press Ctrl+Shift+Esc to open Task Manager. End all processes named “Teams” or “ms-teams”. Open File Explorer and type %appdata%\Microsoft\Teams in the address bar. Delete all files and folders inside this directory. Do not delete the Teams folder itself. Restart Teams and sign in again. This forces Teams to rebuild its cache and fetch the new site URL.
  2. Verify the new SharePoint site URL
    Go to the SharePoint admin center at admin.microsoft.com. Select “Active sites” under Sites. Find the site you renamed. Check the URL column. Copy the full URL. If the URL is still the old one, the rename did not complete. If it is the new one, note the exact URL for the next step.
  3. Update the channel’s Files tab
    In Teams, go to the channel that has the upload problem. Click the Files tab at the top. If the tab shows an error or a blank page, click the ellipsis (three dots) next to the tab name. Select “Remove”. Then click the plus sign (+) to add a new tab. Choose “SharePoint Pages” or “Document Library”. Enter the new site URL that you copied. This creates a fresh link to the correct library.
  4. Check the file upload permission
    Sometimes the rename changes the site’s permission inheritance. Go to the site’s settings and click “Site permissions”. Ensure that the user or group trying to upload has at least Contribute permission. If the site uses unique permissions, add the user to the Members group. Then test the upload again.
  5. Use the SharePoint Migration Tool to fix orphaned links
    If the problem persists, the channel may have orphaned links that point to the old site. Download the SharePoint Migration Tool (SPMT) from the Microsoft download center. Run a scan on the document library to detect broken references. The tool can update the links to the new URL. This is an advanced step, so only do this if the previous steps fail.

ADVERTISEMENT

If Teams Still Has Issues After the Main Fix

Teams Shows “File Not Found” When Opening a Chat Attachment

This happens when the chat message contains a link to the old site URL. The link is stored in the message and does not change automatically. To fix it, delete the message and resend it after you have updated the channel’s Files tab. If you need to keep the message, ask the sender to edit it and attach the file again using the new URL.

Upload Works in One Chat but Not Another

Different chats may use different SharePoint sites. If the rename affected only one site, only chats that reference that site will fail. Check each chat’s file history. For chats that still fail, repeat the cache clearing and tab update steps for the specific channel associated with that chat.

Upload Fails with Error Code 403 Forbidden

A 403 error means the user has no permission to upload. This often occurs when the site rename breaks the permission inheritance. Go to the site’s permissions and grant the user “Edit” permission. Also check if the site is in read-only mode. You can see this in the SharePoint admin center under “Site status”. If the site is read-only, change it to “Ready”.

New Teams Desktop vs Teams on the Web After a Site Rename

Item New Teams Desktop Teams on the Web
Cache clearing Manual deletion of %appdata%\Microsoft\Teams Clear browser cache and site data
Site URL refresh Requires client restart after cache clear Refreshes on page reload
Channel Files tab update Remove and re-add tab manually Same process as desktop
Error visibility Error appears in a pop-up dialog Error appears in the browser console
Best for troubleshooting More comprehensive cache control Quicker refresh for testing

After you complete the fixes, you can upload files in Teams chat again. The key is to clear the cache and update the channel’s Files tab with the new site URL. If the problem persists, check permissions and use the SharePoint Migration Tool. As an advanced tip, you can run the Teams diagnostic tool by typing “diag: upload file” in the search box at the top of Teams to get a detailed report on upload failures.

ADVERTISEMENT