Fixes / Teams · Checked

Teams "You don't have access to this file": causes and fixes

Short answer

Teams shows "You don't have access to this file" when the file you clicked is stored in someone else's OneDrive or SharePoint and your account is not on its sharing list. This often happens when you were added to a chat after the file was posted. The fastest fix is to ask the person who shared it to add you by name through the file's Share or Manage access option.

What this message means

Teams does not store files itself. A file attached in a 1:1 or group chat is uploaded to the sender's OneDrive, in a folder called Microsoft Teams Chat Files. A file posted in a channel goes to the team's SharePoint site. The file card in Teams is only a link. When you click it, OneDrive or SharePoint checks whether your account has permission. If the answer is no, Teams shows this message. The file usually still exists and nothing on your computer is broken. It just has not been shared with your account. Sometimes the cause is a stale Teams cache, a OneDrive site setting, or an account ID problem that only an admin can fix.

Common causes

CauseHow to tell
The file was never shared with you, usually because you joined the chat after it was posted or the sender pasted a link that only works for specific people.Other people in the chat can open the file but you can't. The message was posted before you joined, or it's a pasted link rather than an attachment card.
The Teams desktop app has cached old or broken permission data.The same file opens fine at teams.microsoft.com or in a browser, but the Teams desktop app shows the error. Sometimes it happens on files you own.
The sender's OneDrive has the site collection feature "Limited-access user permission lockdown mode" turned on.Every chat file from one particular person fails for everyone they send it to, while files from other people open normally.
Your Microsoft 365 account was deleted and recreated with the same email address, so SharePoint still has your old user ID (a site user ID mismatch).You are a returning employee or your account was rebuilt. Files from many colleagues fail in both the Teams app and the browser, sometimes with "Access denied" instead.
The file comes from another organization, or you are a guest, and external sharing is blocked or was not granted.The file card shows an "External" label, or the sender is from a different company. The error appears even after you sign in again.
The file was deleted or moved, or the sender left the organization and their OneDrive was removed.No one in the chat can open the file. The sender may show as unknown or no longer in your directory.

How to fix it

1. Open the file in a browser and request access

  1. In the chat or channel, hover over the file card and select More options (...).
  2. Select Open in browser.
  3. If the browser page says you need permission, type a short note and select Request access (or Send request).
  4. The file owner gets an email and can approve it with one click. Reopen the file after they approve it.

2. Ask the sender to share the file with you directly

  1. Ask the person who posted the file to go to onedrive.com (or open the OneDrive app) and select My files > Microsoft Teams Chat Files. For channel files, they open the channel's Files tab instead.
  2. They select the file, then select Share (or More options (...) > Manage access).
  3. They add your name or email and choose Can view or Can edit.
  4. They select Send or Grant access. Then close and reopen the file in Teams.
  5. If you only need the file once, they can also send it to you again as a new attachment in a chat you're already in. Teams shares new attachments with everyone currently in the chat.

3. Clear the Teams cache (when it works in a browser but not in the app)

New Teams on Windows 10/11 and macOS. Classic Teams uses different folders: %appdata%\Microsoft\Teams on Windows, ~/Library/Application Support/Microsoft/Teams on Mac.

  1. Quit Teams completely. On Windows, right-click the Teams icon in the taskbar and select Quit. On Mac, press Command+Q.
  2. Windows (easiest): open Settings > Apps > Installed apps, search for Microsoft Teams, select More options (...) > Advanced options, then select Reset. This also clears your personal Teams settings.
  3. Windows (alternative): press Windows key+R, enter %userprofile%\appdata\local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams, select OK and delete everything in that folder.
  4. Mac: open Terminal and run rm -rf ~/Library/Group\ Containers/UBF8T346G9.com.microsoft.teams, then run rm -rf ~/Library/Containers/com.microsoft.teams2.
  5. Restart Teams and sign in. The first start takes longer while the cache rebuilds.
  6. If the error comes back, set Teams to open files outside the app: Settings and more (...) > Settings > Files and links, then set Word, PowerPoint and Excel files to open in the Browser or the Desktop app.

4. Turn off Limited-access user permission lockdown mode on the sender's OneDrive

Needs the OneDrive owner (the sender) or a SharePoint admin. Microsoft 365 work or school accounts.

  1. The sender signs in to their OneDrive on the web.
  2. They select the Settings (gear) icon in the upper-right corner.
  3. They select OneDrive Settings > More Settings.
  4. Under Features and storage, they select Site Collection Features.
  5. They find Limited-access user permission lockdown mode and select Deactivate. Then the recipient tries the file again.

5. Fix a site user ID mismatch (recreated accounts)

Microsoft 365 admins only. Not available in GCC High, DoD or Microsoft 365 operated by 21Vianet.

  1. Confirm that the affected account was deleted and recreated with the same user name (UPN).
  2. Run the Site User Mismatch diagnostic from the Microsoft 365 admin center (linked from Microsoft's "Fix site user ID mismatch" article) with a SharePoint admin account.
  3. Enter the affected account and the site URL. For a colleague's OneDrive, find it under OneDrive Settings > More Settings > Diagnostic Information.
  4. Accept the offer to remove the old ID. Then have the file owner share the file again.
  5. Wait up to an hour (up to 24 hours for OneDrive site changes). Have the user sign out, clear the Teams cache and try again.

6. Allow file sharing with external or guest users

Microsoft 365 admins. Only applies when the file card shows "External" or the chat includes another organization.

  1. Check the Teams files policy in PowerShell: Connect-MicrosoftTeams, then Get-CsTeamsFilesPolicy | Select Identity, FileSharingInChatsWithExternalUsers.
  2. If it's Disabled and your policy allows it, run Set-CsTeamsFilesPolicy -Identity Global -FileSharingInChatsWithExternalUsers Enabled. Changes can take several hours to apply.
  3. In the SharePoint admin center, make sure external sharing for OneDrive allows guests, and that domain restrictions don't block the recipient's domain.
  4. If the sender pasted a link instead of attaching the file, Teams does not share it automatically. The sender has to add the external person in Manage access.

Next time, skip the search

Crade is an AI assistant for Mac and Windows that sees your screen. When a message like this pops up, ask “what does this mean?” and it explains the exact error in front of you, step by step.

Download Crade

Still not fixed?

Try opening the file at teams.microsoft.com or directly in OneDrive or SharePoint. If you get "Access denied" there too, the problem is permissions, not the Teams app. Send your IT admin the file name, who shared it, the chat or channel, and whether your account was ever recreated. Admins can run the "Unable to access files in a team" and Site User Mismatch diagnostics in the Microsoft 365 admin center. If those find nothing, they can open a service request with Microsoft from the admin center. If the sender has left the company, ask their manager or IT to recover the file from the sender's OneDrive before it is deleted.

Questions people ask

Why can everyone else in the chat open the file but not me?

Teams shares a chat attachment with the people in the chat at the moment it is posted. If you joined later, or the sender pasted an existing link, you were never added. Ask the sender to share it with you or post it again.

Why does the file open in my browser but not in the Teams app?

That usually points to stale data in the Teams desktop cache rather than missing permissions. Clear or reset the Teams cache, or change Settings > Files and links so files open in the browser or desktop app.

Does clearing the Teams cache delete my chats or files?

No. Chats and files are stored in Microsoft 365, not on your computer. Resetting new Teams on Windows does clear local preferences such as theme and notification settings.

I get this error even on a file I uploaded myself. Why?

If you own the file, permissions are not the cause. It's usually a Teams client issue, so clear the cache or open it in the browser. If it still fails, ask IT to check your OneDrive for a user ID mismatch.

What happens to chat files when the sender leaves the company?

The files live in the sender's OneDrive, so they become unavailable once the account and its OneDrive are deleted. An admin can give the manager access to that OneDrive during the retention period to save the files.

Sources