This error occurs when you update your credentials (network account, database login, or Microsoft 365 password) but Excel attempts to authenticate against the data source using old credentials stored in its local connection cache or the Windows Credential Manager. Because the handshake fails, the external system rejects the connection.
Quick Answer
Clear the outdated cached credentials in Excel by navigating to Data > Get Data > Data Source Settings. Under Global permissions, select the target source and click Clear Permissions. Refresh the data; Excel will display a clean prompt where you can enter your new credentials.
Why Power Query Fails to Prompt for New Passwords
When you connect to an external source (like a SharePoint site, SQL Server, OData feed, or Web API), Power Query stores your authentication tokens locally. This prevents you from having to type your password on every refresh.
When your organizational password expires or updates, the remote server terminates the old token. However, rather than presenting a fresh login window, Power Query often re-attempts connection requests with the cached credentials until the host server drops the connection, returning:
- “We couldn’t authenticate with the credentials provided.”
- “Access to the resource is forbidden.”
- “We couldn’t connect to the data source.”
Step-by-Step Resolution
Step 1: Clear Cached Permissions in Excel
Always clear permissions from the Global Permissions store rather than the current workbook file store to ensure changes apply across all workbooks.
- Open Excel and open the affected workbook.
- Go to the Data tab.
- Click Get Data (or the small arrow next to it) and select Data Source Settings.
- Select the radio button for Global permissions (this ensures old passwords are removed from all local Power Query profiles).
- Locate the data source path or URL in the list.
- Click Clear Permissions (or Edit Permissions if you prefer updating directly).
- Click Delete when prompted to confirm removal.
- Click Close.
┌────────────────────────────────────────────────────────┐
│ Data Source Settings │
├────────────────────────────────────────────────────────┤
│ ( ) Data sources in current workbook │
│ (•) Global permissions │
│ │
│ Selected Data Sources: │
│ ┌──────────────────────────────────────────────────┐ │
│ │ <https://company.sharepoint.com/teams/Finance> │ │
│ │ sqlserver-prod.corp.local;DataWarehouse │ │
│ └──────────────────────────────────────────────────┘ │
│ │
│ [ Edit Permissions... ] [ Clear Permissions ] │
└────────────────────────────────────────────────────────┘
Step 2: Trigger the Authentication Prompt
- Go to the Data tab and click Refresh All (or open the Power Query Editor and click Refresh Preview).
- Excel will detect that no valid credentials exist for the data source and will display the authentication dialog.
- Select the correct authentication type:
- Windows: Use this for internal Active Directory and network-joined database queries.
- Database: Use this for dedicated server accounts (like a SQL user with an independent
saor reporting login). - Organizational Account: Use this for Microsoft 365, SharePoint Online, OneDrive, or Azure resources.
- Enter your new password and click Connect.
What to Do If the Error Persists
If clearing Excel’s Data Source Settings does not resolve the issue, the old credentials are likely locked in Windows-level system stores or conflicted by URL mismatches.
1. Purge the Windows Credential Manager
Windows maintains an operating-system credential repository that can override application-level sign-ins:
- Close all running instances of Microsoft Excel.
- Press the
Windows Key, type Credential Manager, and pressEnter. - Select Windows Credentials.
- Under Generic Credentials, look for entries related to:
MicrosoftOffice16_Data:...SSO_POP_User:...- Specific database server names or SharePoint tenant URLs.
- Click the arrow next to the matching entry and click Remove.
- Restart Excel and run the refresh.
2. Confirm the Matching Path Scope
A common point of confusion occurs when multiple queries connect to different folder paths on the same host (e.g., SharePoint):
- Query 1 connects to
https://company.sharepoint.com/teams/Finance - Query 2 connects to
https://company.sharepoint.com/teams/HR
If permissions are set at the site level rather than the root domain, updating the password for one directory does not update credentials for the other.
In Data Source Settings, inspect whether separate entries exist for individual subfolders. If so, click Clear All Permissions to reset the root authentication, or configure the path scope to the root domain level (https://company.sharepoint.com).
3. Enterprise SQL Server Authentication Changes
For dedicated database server updates (e.g., SQL Server or Oracle) where database credentials differ from Windows logins, see the specific connection steps in Handling “The credentials provided for the SQL source are invalid” after password rotation.
For general maintenance on external data connection paths, review Managing Data Source Settings: How to clear and reset Global Permissions and “Data Source Not Found”: Fixing broken paths after moving a folder.