How to Fix Repeated Login Prompts for Excel Files on OneDrive
Question details
The user is experiencing repeated authentication requests when trying to connect Excel to files hosted on OneDrive or SharePoint.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Connecting an Excel workbook to external data sources hosted on OneDrive or SharePoint.
- Observed behavior
- Excel repeatedly prompts for login credentials due to incorrect URL formats or credential configurations.
Ensure you are logged into your Microsoft 365 account with the correct organizational credentials and have sufficient permissions to access the target OneDrive or SharePoint files.
Use the Direct SharePoint or OneDrive File Path
Remove web parameters from the file URL and configure the connection with an Organizational Account to prevent authentication loops.
When you copy a link directly from a web browser, it often includes extra web parameters (like ?web=1). These parameters force Excel to handle the file as a web page rather than a direct data source, which triggers a continuous loop of login prompts. Using the direct path solves this issue.
Open the source file in SharePoint or OneDrive online. Go to File > Info > Copy Path to get the direct link.
Paste the copied URL into a text editor. Delete '?web=1' and any other parameters at the end of the link so it ends with the file extension (e.g., .xlsx).
In your main Excel file, recreate or edit the data connection using the cleaned URL.
When prompted for credentials, choose 'Organizational Account' and ensure the credential scope is set to match the SharePoint site level.

Try WPS Office for Seamless File Management
If you are frustrated with complex authentication loops and connection issues in Microsoft Excel, switch to WPS Office. It is a free, lightweight, and highly compatible Office alternative that makes managing local and cloud files effortless with a familiar UI and seamless migration.
- 1. Download WPS Office: Visit the official WPS Office website to download the free installer.
- 2. Install the software: Run the installer and follow the on-screen instructions to complete the setup.
- 3. Open and edit files: Launch WPS Spreadsheet and seamlessly open your existing .xlsx files without complicated data connections.

Frequently Asked Questions
Why does Excel keep asking for my password when opening OneDrive files?
This usually happens if the file link contains browser parameters (like ?web=1) or if Windows cached credentials are out of sync with your Office account.
How do I clear cached credentials in Excel?
You can clear cached credentials by opening the Windows Control Panel, navigating to Credential Manager, and removing any stored passwords under 'Windows Credentials' that relate to Microsoft Office.
Can I link OneDrive files without using SharePoint?
Yes, if you use the OneDrive desktop sync client, you can link files using the local file path on your computer instead of a web URL, which often avoids authentication prompts entirely.




