Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
11 months ago
Solved

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 to Power BI Service, I'm unable to set up automatic data refresh. The Data Source Credentials section is grayed out, and I can't edit or authenticate the credentials.

Has anyone faced a similar issue with OAuth2 data sources in Power BI Service? Is there a workaround or configuration step I might be missing?

Screenshot for reference:

 




Any help or guidance would be greatly appreciated!

Thanks in advance.

  • 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.

     

     

5 Replies

  • Did you add any new datasource to the file, is it created in Service? Anonymous 

  • v-tejrama's avatar
    v-tejrama
    Community Support

    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.

     

     

  • Hi Anonymous ,

    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.


    Thank you.

  • 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-tejrama's avatar
      v-tejrama
      Community 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.