How to Fix Power Query SharePoint Credentials Prompt in Excel
Question details
Users need to know how to properly prompt for and handle SharePoint credentials when an Excel macro refreshes Power Query data.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Refreshing data stored in SharePoint using an Excel macro via Power Query.
- Observed behavior
- Power Query fails to authenticate to SharePoint, and the credentials dialog may be missing, invalid, or suppressed by the macro.
Ensure you have a stable internet connection and that your organizational account has at least read access to the target SharePoint resource.
Manually Authenticate the Organizational Account
Test the refresh process without the macro to trigger the standard Power Query credentials dialog and sign in correctly.
By default, Power Query should automatically display a credentials dialog if it cannot authenticate to SharePoint. Isolating the refresh from the macro helps determine if the issue is with the credentials themselves.
Navigate to the 'Data' tab in the Excel ribbon and click 'Refresh All' without running your macro.
When the Power Query credentials dialog appears, select the 'Organizational account' option from the left-hand menu.
Click the 'Sign in' button and enter your organizational email address and password associated with the SharePoint site.
Click 'Connect' to save your credentials. The data refresh should now complete successfully.

Check Macro Settings for Suppressed Dialogs
Ensure your VBA macro is not preventing the authentication dialog from appearing during the data refresh.
Try WPS Office for Seamless Spreadsheet Management
If you want to avoid complex credential configurations and macro troubleshooting, WPS Office provides a lightweight, highly compatible, and user-friendly alternative for your daily spreadsheet needs.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install the software: Run the downloaded installer and follow the simple on-screen instructions to complete the setup.
- 3. Open your spreadsheets: Launch WPS Spreadsheets and open your existing Excel files directly to continue working seamlessly.

Frequently Asked Questions
Why isn't Power Query prompting for SharePoint credentials automatically?
This usually happens if an Excel macro is intercepting the refresh process, or if 'Application.DisplayAlerts' is set to False in your VBA code, which suppresses the necessary authentication dialog box.
Which account type should I select for SharePoint in Power Query?
When the credentials dialog appears, you should always select the 'Organizational account' option and sign in with the work or school email address that has access to the SharePoint site.
How do I clear or change my existing Power Query credentials?
In Excel, go to the 'Data' tab, select 'Get Data', and click 'Data Source Settings'. Locate your SharePoint URL in the list, click 'Clear Permissions' or 'Edit Permissions', and try refreshing your data again to trigger a new prompt.




