Fix ResourceAccessForbiddenException When Refreshing Power Query from Teams in Excel
Question details
Users encounter a ResourceAccessForbiddenException and invalid CRLF character errors when trying to refresh Excel Power Query data connected to Microsoft Teams channels.

- 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.
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.
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.
Right-click the Microsoft Teams icon in your system tray (Windows) or dock (Mac) and select 'Quit' to ensure the application is completely closed.
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.
Open Finder, press Command + Shift + G, and enter `~/Library/Application Support/Microsoft/Teams/`. Delete the files within this folder.
Relaunch Microsoft Teams, sign back in if prompted, open your Excel workbook, and attempt to refresh the Power Query connection again.
Request Microsoft 365 Backend Support
If the issue only affects specific users and clearing the cache fails, the problem may lie in backend tenant permissions requiring Microsoft support.
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. Download WPS Office: Visit the official WPS website and download the free installation package.
- 2. Install and Launch: Follow the on-screen instructions to install WPS Office, then open WPS Spreadsheet.
- 3. Import Excel Files: Open your existing .xlsx files seamlessly and manage your data without complex server-side interruptions.

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.




