Fix Excel Power Query SQL Login Failed Errors
Question details
The user needs to troubleshoot and resolve a SQL login failure in Excel Power Query, especially in scenarios where the same query refreshes successfully for other users.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Attempting to refresh an Excel Power Query that connects to a SQL Server database.
- Observed behavior
- A SQL login failure error occurs for a specific user, preventing the data query from refreshing, even though the query works for colleagues.
Ensure you have the correct SQL server name, database name, and the appropriate login credentials provided by your database administrator before attempting to reset your connection settings.
Clear and Re-enter Data Source Credentials in Power Query
Outdated or incorrectly saved local credentials are the most common cause of user-specific login failures in Power Query.
Power Query stores data source credentials locally on your machine. If your password has changed or if the connection was initially set up with different authentication methods, clearing the global permissions and forcing a fresh login prompt often resolves the issue.
Launch Microsoft Excel, navigate to the 'Data' tab on the ribbon, click on 'Get Data', and then select 'Data Source Settings'.
In the Data Source Settings dialog box, ensure 'Global permissions' is selected at the top. Scroll through the list to find the SQL server connection that is failing.
Click on the failing SQL server connection to highlight it, then click the 'Clear Permissions' button at the bottom (or select 'Clear All Permissions' to reset everything). Click 'Delete' to confirm.
Close the settings window and attempt to refresh your query again. Excel will prompt you for credentials. Select 'Database' or 'Windows' authentication as required, enter your correct username and password, and click 'Connect'.

Verify User-Specific SQL Server Permissions
If your credentials are correct but the login still fails, your specific user account may lack appropriate database access rights.
Seek Specialized Support from the Microsoft Fabric Community
For persistent Power Query errors that cannot be resolved by resetting credentials locally, consulting specialized Microsoft experts is recommended.
Try WPS Office for Your Data Analysis Needs
Experiencing frequent connection errors or login issues with complex Excel tools? Consider WPS Office as a free, lightweight, and highly compatible alternative for your spreadsheet and data analysis tasks. Enjoy a familiar interface and seamless migration without the heavy licensing fees.
- 1. Download WPS Office: Visit the official WPS Office website to download and install the free software suite.
- 2. Open Your Excel Files: Launch WPS Spreadsheets and click 'File' > 'Open' to browse for your existing .xlsx or .csv files.
- 3. Analyze Your Data: Use familiar formulas, pivot tables, and data filtering tools natively within WPS Spreadsheets.

Frequently Asked Questions
Why does the Power Query refresh work for my colleague but fail for me?
This usually happens because Power Query caches data source credentials locally on each computer. Your colleague likely has the correct, updated credentials saved in their Excel Data Source Settings, while your cached credentials might be outdated, corrupted, or pointing to the wrong authentication method.
How do I change from Windows Authentication to SQL Server Authentication in Power Query?
Go to the Data tab on the Excel ribbon, select 'Get Data', then 'Data Source Settings'. Find your database connection in the list and click 'Edit Permissions'. Under the Credentials section, click 'Edit' and select the 'Database' tab on the left side of the prompt to enter your SQL username and password instead of using Windows credentials.
Can I bypass a SQL Server encryption certificate error in Power Query?
If you receive an encryption or certificate error during login, you can often bypass it by unchecking the 'Encrypt connections' option in your data source settings. However, doing so means your data will be transmitted in plain text, which is not recommended for sensitive information over public networks.




