Forum Discussion
Anonymous
11 months agoNot applicable
Data Source Credentials grayed out, Cannot Refresh API Data
Hi everyone, I've built a dashboard in Power BI Desktop that uses an OAuth2-based data source. Everything works perfectly in Desktop — including data refresh. However, after publishing the report t...
- 11 months ago
Hi Anonymous ,
Thanks for reaching out to the Microsoft fabric community forum.- Connector Support Verification: Confirm whether the API connector is officially supported in Power BI, such as SharePoint, Dynamics 365, or Google Analytics. Official connectors typically feature built-in OAuth2 authentication.
- Custom API Considerations: For custom APIs, be aware that Power BI Service does not support direct OAuth2 authentication.
- Implementing On-Premises Data Gateway:
- Install and configure either a Personal or Standard Gateway.
- Navigate to Power BI Service → Settings → Gateway connections, and map your dataset to the gateway.
- Input API credentials within the gateway data source configuration.
- This approach enables dataset refreshes even when OAuth2 is not natively supported in the Service.
- Dynamic URLs via Web.Contents: When using Web.Contents with dynamic URLs, include API key or token parameters as needed.
Web.Contents("https://api.example.com", [Query=[...], ApiKeyName="Authorization"])- In Power BI Service, set Skip test connection in the dataset settings.
- Alternative Token Methods: Some users embed refresh tokens in Power Query for long-lived access, though this is not recommended as a best practice.
- Recommended Approach – Custom Connector: For ongoing API integration, develop a Power BI custom connector with OAuth2 authentication and deploy it through the Gateway to support a complete OAuth2 flow in the Service.
Thank you,
Tejaswi.
v-nmadadi-msft
11 months agoCommunity Support
Hi Anonymous
May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.
Thank you
- v-tejrama10 months agoCommunity Support
Hi Anonymous ,
I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.
Thank you.