Power Query Problems

Fix ResourceAccessForbiddenException When Refreshing Power Query from Teams in Excel

Aamir Naveed AkramAamir Naveed Akram Nov 4, 2026 869 views

Question details

Users encounter a ResourceAccessForbiddenException and invalid CRLF character errors when trying to refresh Excel Power Query data connected to Microsoft Teams channels.

How to Fix ResourceAccessForbiddenException When Refreshing Power Query from Teams
Product
Microsoft Excel and Microsoft Teams
Device & OS
not provided
Scenario
Refreshing an Excel Power Query connection linked to files stored in Microsoft Teams.
Observed behavior
The data refresh fails with a ResourceAccessForbiddenException and an invalid CRLF character error for certain users, while other users can successfully refresh the same query.
Before you start

Verify whether the affected users are attempting to refresh the workbook directly within the Teams interface, Excel for the web, or the standalone Excel desktop application, as the environment can impact data connection permissions.

Solution 1Recommended

Clear the Microsoft Teams Application Cache

Clearing the Teams desktop cache removes temporary files and corrupted authentication tokens that often cause resource access forbidden exceptions.

If you are using the Microsoft Teams desktop application, a corrupted local cache can prevent Excel from properly authenticating and retrieving data for Power Query. Fully resetting this cache forces Teams to generate a fresh connection token.

1
Fully Exit Microsoft Teams

Right-click the Microsoft Teams icon in your system tray (Windows) or dock (Mac) and select 'Quit' to ensure the application is completely closed.

2
Clear Cache on Windows

Press the Windows Key + R to open the Run dialog. Type `%appdata%\Microsoft\teams` and press Enter. Select all files and folders in this directory and delete them.

3
Clear Cache on Mac

Open Finder, press Command + Shift + G, and enter `~/Library/Application Support/Microsoft/Teams/`. Delete the files within this folder.

4
Restart and Test

Relaunch Microsoft Teams, sign back in if prompted, open your Excel workbook, and attempt to refresh the Power Query connection again.

Cache Rebuilding: The first time you open Teams after clearing the cache, it may take a little longer to load as it downloads necessary web data.
Free Microsoft Office alternative

Experience Hassle-Free Data Management with WPS Office

Dealing with strict Microsoft Teams integration errors and Power Query permission issues can disrupt your workflow. Try WPS Office as a free, lightweight, and highly compatible alternative for your daily spreadsheet and data analysis needs.

  1. 1. Download WPS Office: Visit the official WPS website and download the free installation package.
  2. 2. Install and Launch: Follow the on-screen instructions to install WPS Office, then open WPS Spreadsheet.
  3. 3. Import Excel Files: Open your existing .xlsx files seamlessly and manage your data without complex server-side interruptions.
Completely free and lightweight office suiteHigh compatibility with Microsoft Excel formats (.xlsx, .xls, .csv)Familiar user interface for a zero-learning-curve transitionBuilt-in robust data analysis tools without complex backend dependencies
QA img-9

Frequently Asked Questions

Why do only some users get the ResourceAccessForbiddenException in Teams?

This often occurs due to localized cache corruption, expired authentication tokens on the specific user's device, or discrepancies in SharePoint access rights linked to the Microsoft Teams channel.

Does opening the file in Excel for the web prevent this Power Query error?

Yes, in many cases, opening the workbook in Excel for the web or launching it directly in the standalone Excel desktop application bypasses the specific Teams desktop integration issues, allowing the Power Query to refresh successfully.

What does the invalid CRLF character error mean in Excel Power Query?

This error typically indicates a formatting or encoding mismatch in the data returned from the server. When authentication fails (such as an access forbidden exception), the server may return an HTML error page instead of the expected data stream, causing Excel to trip over unexpected carriage return/line feed (CRLF) characters.