How to Prevent Power Query from Saving Connection Credentials in Excel
Question details
The user needs to prevent Power Query from automatically saving connection credentials to avoid recurring account lockouts when passwords are periodically changed.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Connecting to external data sources using Power Query where account passwords are required to be updated frequently.
- Observed behavior
- Power Query automatically saves credentials in the background. When passwords change, it continues to use old credentials, causing account lockouts unless permissions are manually cleared in each workbook.
Before proceeding, identify all the external data sources connected to your workbook, as you will need to manually clear or update the authentication settings in the Data Source Settings menu.
Manually Clear or Update Data Source Permissions
Since Power Query does not offer a global toggle to completely disable credential saving, the most reliable method is to periodically clear or edit your saved permissions.
Microsoft Excel currently lacks a built-in feature to entirely prevent Power Query from remembering connection credentials. To avoid account lockouts after a password change, you must manually clear the cached credentials globally or per workbook.
Open your Excel workbook, navigate to the 'Data' tab on the top ribbon, click on 'Get Data', and select 'Data Source Settings' from the dropdown menu.
In the Data Source Settings dialog box, choose either 'Global permissions' (which applies to all files on your computer) or 'Data sources in current workbook'.
Select the specific data source from the list, click 'Clear Permissions' to remove the saved credentials, or select 'Edit Permissions' to update them with your new password.

Use Windows Authentication
Switching to Windows Authentication can bypass the need to save and update database-specific passwords in Power Query.
Try WPS Office for Lightweight Data Management
If you are struggling with complex Power Query settings, credential management, and account lockouts in Microsoft Excel, WPS Office offers a simplified and highly compatible alternative. WPS Office provides excellent spreadsheet functionalities without the heavy administrative overhead.

Frequently Asked Questions
Can I permanently disable credential saving in Power Query?
Currently, Microsoft Excel does not provide a native, supported global setting to permanently prevent Power Query from storing connection credentials. You must manually manage and clear them in the Data Source Settings.
Why does my account lock out when I refresh my Excel data?
Account lockouts occur because Power Query caches your previous authentication details. When your password expires or changes, Power Query repeatedly attempts to connect using the old, saved password, triggering your server's security lockout policies.
Does clearing permissions in one Excel file fix it for all files?
It depends on the scope you choose. If you clear 'Global Permissions' in the Data Source Settings, it will remove the cached credentials for all workbooks on your computer. If you clear 'Data sources in current workbook', it only affects that specific file.




