Power Query Problems

Why Excel Power Query Redirects to Sign-In for a Private Google Sheet API Key

Nimra MalikNimra Malik Nov 13, 2026 868 views

Question details

The user needs to understand why an OData.Feed connection that includes an API key redirects to Google sign-in instead of returning data from a private Google Sheet.

Why Excel Power Query Redirects to Sign-In for a Private Google Sheet API Key
Product
Microsoft Excel Power Query and Google Sheets API
Device & OS
not provided
Scenario
The user is trying to connect Excel Power Query to a private Google Sheet through an OData.Feed URL that includes an API key.
Observed behavior
The connection redirects to Google sign-in and does not return the private Google Sheet data.
Before you start

Confirm whether the target Google Sheet is private and whether your current URL is an OData.Feed address that includes only an API key. Open the Google Sheets API documentation and your Google Cloud Console project so you can create the correct OAuth 2.0 credentials or service account before changing the connection in Excel.

Solution 1Recommended

Use the Google Sheets API endpoint with OAuth 2.0 or a service account in Power Query

Choose this method when you need data from a private Google Sheet and an OData.Feed URL with an API key returns a Google sign-in page instead of data.

An API key identifies your Google Cloud project but does not prove that you have permission to read a private Google Sheet. Google Sheets is not an OData feed, so OData.Feed cannot authenticate the request correctly.

Power Query can consume the JSON response from the Google Sheets API, but you must authenticate with OAuth 2.0 or a service account that has access to the sheet.

1
Enable the Google Sheets API in Google Cloud Console

Open console.cloud.google.com, create or select a project, go to APIs & Services > Library, search for Google Sheets API, and click Enable.

2
Create OAuth 2.0 credentials or a service account

Go to APIs & Services > Credentials, click Create Credentials, and choose OAuth client ID for user sign-in or Service Account for automated access. If you use a service account, share the private Google Sheet with the service account email.

3
Open Power Query's web connector in Excel

In Excel, select Data > Get Data > From Other Sources > From Web to open the Power Query web connector.

4
Enter the Google Sheets API endpoint instead of an OData URL

Enter the Google Sheets API v4 endpoint, for example https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{sheetName}!{range}, replacing the placeholders with the private sheet's ID, sheet name, and range.

5
Authenticate with the Google account that has access

In the Power Query authentication dialog, choose the appropriate web authentication method, sign in with the authorized Google account, and accept the Google consent screen.

Use the Google Sheets API endpoint with OAuth 2.0 or a service account in Power Query
Private data loads without redirect: After successful authentication, Power Query returns the sheet values as JSON. Expand the values table in Power Query instead of being redirected to Google sign-in.
Free Microsoft Office alternative

Skip Excel Power Query authentication issues by opening Google Sheets exports in WPS Office

WPS Office is a free, lightweight Microsoft Office alternative with full compatibility for Excel workbooks and CSV exports. When Google Sheets API authentication becomes too complex, export the sheet and open it in WPS Spreadsheets with a familiar ribbon interface and no API key or OAuth redirect.

  1. 1. Export the private Google Sheet as an Excel or CSV file: In Google Sheets, select File > Download > Microsoft Excel (.xlsx) or Comma-separated values (.csv) to save a copy to your computer.
  2. 2. Download WPS Office Free: Go to the official WPS Office website, click Download, and install WPS Office on Windows, macOS, Linux, Android, or iOS.
  3. 3. Open the exported file in WPS Spreadsheets: Launch WPS Office, click Spreadsheets, then open the .xlsx or .csv file you exported from Google Sheets.
  4. 4. Edit and save with Excel-compatible formatting: Use the familiar ribbon tools to review, edit, and format the data, then save the file as .xlsx to keep Microsoft Excel compatibility.
Opens .xlsx, .xls, and .csv files exported from Google Sheets without extra API authentication.Lets you review and edit Google Sheets data in WPS Spreadsheets without an API key or OAuth redirect.Provides a familiar ribbon interface for easy migration from Microsoft Excel.Full compatibility with Microsoft Excel workbooks, including formulas, charts, and pivot tables.Lightweight installation that runs smoothly on Windows, macOS, Linux, Android, and iOS.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Excel Power Query OData.Feed URL with an API key redirect to Google sign-in?

Because Google Sheets is not an OData feed, and an API key alone does not authorize access to private sheet content. Google requires OAuth 2.0 or a service account to authenticate requests to the Google Sheets API.

Can I connect Excel Power Query to a private Google Sheet without OAuth?

For private sheets, no supported API access works without proper authorization. You can use OAuth 2.0 with an authorized Google account or a service account that has been shared on the sheet.

Which URL should I use instead of an OData.Feed URL?

Use the Google Sheets API v4 endpoint, such as https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{sheetName}!{range}, and authenticate in the Power Query web connector.

Does WPS Office support Power Query connections to Google Sheets?

WPS Office is a free Microsoft Office alternative and does not provide Excel Power Query. However, you can export the Google Sheet as .xlsx or .csv and open it directly in WPS Spreadsheets.

What should I check if the Google Sheets API still returns a sign-in page after switching?

Check that the Google Sheets API is enabled in Google Cloud Console, the OAuth consent screen is configured, the signed-in Google account has access to the sheet, and the endpoint URL uses the correct spreadsheet ID and range.