How to Connect Excel and Power BI to an OAuth 2.0 OData Feed
Question details
The user wants to securely connect Microsoft Excel or Power BI to an OData service protected by OAuth 2.0 to enforce user-specific data access.

- Product
- Microsoft Excel, Power BI
- Device & OS
- not provided
- Scenario
- Importing data from a secure OData service requiring OAuth 2.0 authentication into spreadsheet or BI tools.
- Observed behavior
- Native OData feed connections may not directly support custom OAuth 2.0 configurations without workarounds like API gateways or custom connectors.
Ensure you have the necessary endpoint URLs, client IDs, and authorization details for your OAuth 2.0 OData feed, and verify your organization's security and data access policies before proceeding.
Use Native Power Query OData Authentication
Use the built-in OData feed connector in Excel and Power BI to test and configure available OAuth 2.0 settings via organizational accounts.
Current versions of Excel and Power BI support OAuth 2.0 for Microsoft-based and specific third-party OData feeds natively through Power Query's Organizational Account sign-in.
Launch Excel or Power BI Desktop. Navigate to the Data tab (in Excel) or the Home tab (in Power BI) and select Get Data > From Other Sources > From OData Feed.
Input the base URL of your OData service and click OK.
In the authentication window, select 'Organizational account' on the left sidebar to trigger the OAuth 2.0 login flow.
Click Sign In, enter your credentials in the OAuth pop-up, and click Connect to load your user-specific data.

Implement an Intermediary API Gateway
If direct OAuth 2.0 is unsupported by your specific feed, use an intermediary service to handle the authentication layer.
Develop a Custom Power Query Connector
Build a customized connector using the SDK to natively support your specific OAuth 2.0 flow inside Power BI.
Try WPS Office for Your Data Analysis Needs
While advanced custom OData connectors for proprietary OAuth implementations are specific to Microsoft's Power Query environments, WPS Office provides a free, lightweight, and highly compatible alternative for everyday spreadsheet data analysis. Enjoy familiar features, seamless Excel format compatibility, and advanced data processing without expensive subscriptions.
- 1. Download WPS Office: Visit the official WPS website to download and install the free, lightweight suite.
- 2. Open Your Spreadsheets: Launch WPS Spreadsheet and seamlessly open any exported .xlsx or .csv files generated from your data feeds.
- 3. Analyze Data Quickly: Utilize powerful built-in pivot tables, formulas, and chart functions to analyze your data effortlessly.

Frequently Asked Questions
Why doesn't the Excel OData connector accept my OAuth 2.0 credentials?
Native OData connectors in Excel typically only support specific OAuth flows like Azure AD or predefined Organizational accounts. If your OData service relies on a custom or third-party OAuth 2.0 provider, the native connector may not recognize the authorization flow, requiring an API gateway or custom connector.
Can I use Power Query Custom Connectors directly in Excel?
Custom connectors built with the Power Query SDK are primarily designed and optimized for Power BI Desktop. While there is limited support in specific Excel versions, utilizing an API gateway is generally the more stable and widely supported approach for Excel users.
How do I secure user-specific data access when using an API gateway?
To enforce user-specific access, ensure your API gateway passes user identity context (such as via specific headers or passthrough tokens) to the backend OData service. Implement strict access control policies both at the gateway layer and the underlying database.




