How to Fix Power Query Web Error: Access to the Resource is Forbidden
Question details
The user needs to resolve a 403 'Access to the resource is forbidden' error when importing web data via Power Query.

- Product
- Excel Power Query
- Device & OS
- not provided
- Scenario
- Attempting to import or refresh data from a website into a spreadsheet using Power Query.
- Observed behavior
- Power Query returns an Error 403, indicating the web request is rejected by the server due to saved credentials, incorrect authentication, bot protection, or an interactive login requirement.
Verify that the target URL is correct and check if the website opens normally in a standard web browser without triggering captchas or an interactive login screen.
Clear Data Source Settings and Re-authenticate
Outdated or incorrectly saved permissions are a common cause of 403 errors. Clearing them forces Power Query to prompt for the correct authentication again.
Power Query remembers your authentication choices for specific domains. If you previously selected the wrong authentication type (e.g., Anonymous instead of Windows), the site will continuously reject your requests with a 403 error until the cached credentials are cleared.
Go to the 'Data' tab on your Excel ribbon. Click on 'Get Data' and select 'Data Source Settings' from the dropdown menu.
In the Data Source Settings dialog, search the 'Global permissions' or 'Data sources in current workbook' lists for the website URL causing the error.
Select the problematic URL and click the 'Clear Permissions' button at the bottom. Confirm the action when prompted.
Close the settings window and try importing data from the web again. When the authentication prompt appears, carefully select the correct method (e.g., Anonymous for public sites, or Web API if you have a key) and click 'Connect'.

Use an Official API or Modify Connection Headers
If the website actively blocks automated queries from Power Query but works perfectly in a browser, you may need to use the site's official API or adjust your request headers.
Try WPS Office for Seamless Spreadsheet Management
While advanced Power Query web scraping issues often depend on Microsoft Excel's specific bot behaviors and website firewalls, WPS Office offers a lightweight, fast, and highly compatible alternative for your everyday data analysis and spreadsheet tasks. Enjoy a familiar interface without the hefty subscription fees.
- 1. Visit the Official Website: Go to the official WPS Office website to access the free download.
- 2. Download the Installer: Click the 'Free Download' button to get the installation file for your operating system.
- 3. Install and Launch: Run the downloaded installer, follow the on-screen instructions, and open WPS Spreadsheet to start managing your data.

Frequently Asked Questions
Why does the URL work in my browser but give a 403 error in Power Query?
Web browsers handle cookies, JavaScript, and interactive logins automatically. Power Query sends automated requests, which many websites block to prevent bot scraping or because the request lacks proper authentication headers.
What authentication method should I choose for public websites?
For public websites that do not require you to log in, you should select the 'Anonymous' authentication method when prompted by Power Query.
Can a custom User-Agent fix the 403 Forbidden error?
Yes, sometimes. In the 'From Web' Advanced settings, you can add a 'User-Agent' header to mimic a standard web browser. However, this only works if the site's firewall is solely checking for empty or default Power Query user agents.
How do I connect to a site requiring two-factor authentication (2FA)?
Power Query does not support interactive web login pages with 2FA out of the box. You will need to use the service's official API and authenticate using an API key or an OAuth2 token instead.




