How to Fix SharePoint Data Connection Authentication Errors in Excel
Question details
The user is experiencing authentication failures when attempting to connect an Excel data model to a workbook stored in a SharePoint or Microsoft Teams folder.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Importing or refreshing data from an external workbook stored in a collaborative SharePoint or Teams environment.
- Observed behavior
- The Excel data model fails to authenticate the connection to the SharePoint file, preventing the data from being imported or refreshed, even though connections to OneDrive sources may still work.
Ensure you have copied the exact file path to the SharePoint or Teams workbook and verify that your organizational account has the necessary permissions to access the file.
Update Data Source Settings and Re-authenticate
Use this solution to correct the file path and ensure you are signed in with the correct organizational credentials.
Often, authentication errors occur because the file path is incorrect or the session has expired. Updating the source path and re-authenticating with an organizational account usually resolves the issue.
Navigate to your file in SharePoint or Teams, open the file details or open it in the web app, and copy the direct file path. Be sure to remove any web query parameters like '?web=1' from the end of the URL.
In your Excel desktop application, go to the 'Data' tab on the ribbon, click on 'Get Data', and select 'Data Source Settings'.
Locate and select the problematic SharePoint source from the list, click 'Change Source...', and paste the newly copied file path.
Apply the changes and refresh the workbook. When prompted for credentials, ensure you select 'Organizational account' from the left menu and sign in using your company email and password.

Clear Global Permissions
If updating the source settings doesn't work, cached credentials might be causing a conflict. Clearing them forces Excel to prompt for a fresh login.
Recreate the Data Connection via Web
When modifying existing settings fails, completely removing and recreating the connection can establish a clean link to the SharePoint file.
Experience seamless spreadsheet management with WPS Office
While advanced Microsoft SharePoint data model troubleshooting can be complex and time-consuming, WPS Office provides a lightweight, highly compatible, and free alternative for your daily spreadsheet operations. Enjoy a familiar interface and robust file support without the steep subscription fees.
- 1. Download and Install: Visit the official WPS Office website to download the free installation package for your operating system.
- 2. Open your files: Launch WPS Spreadsheets and easily open your existing Excel workbooks without any format conversion.
- 3. Edit and collaborate: Utilize powerful formulas, charts, and built-in cloud sharing features to manage your data efficiently.

Frequently Asked Questions
How do I get the correct SharePoint file path for Excel?
Open the file in your browser via SharePoint online, go to File > Info, and click 'Copy Path'. Before pasting it into Excel, make sure to delete the '?web=1' parameter at the end of the URL.
Why does my connection work for OneDrive but fail for SharePoint?
OneDrive and SharePoint use different permission hierarchies and authentication tokens. Even if you are logged into OneDrive locally, Excel may require a distinct authentication token using your Organizational Account to access a SharePoint or Teams site directory.
What account type should I choose when authenticating?
When connecting to a corporate SharePoint or Teams file, you must select 'Organizational account' from the left-hand menu in the credentials prompt. Choosing 'Windows' or 'Anonymous' will result in authentication errors.




