Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Refresh Issue in Power BI Service


Hello,
 
I have a PBI report where in Azure Cost Management (ACM) and Web are the data sources in it. The ACM connector is configured with OAuth and Web Connector calls a Microservice API with OAuth type of authentication. And the Microservice API has a relative path with encoded URL in it. Now this power query is running fine and refresh is completing successfully in Power BI Desktop. But when I publish this report to PBI service and create a template app from it, the refreshes are failing with random errors in the installed template app.
Following are the details of how our power query looks with ACM an Web connector;
let
 
Source = AzureCostManagement.Tables(#"AgreementType", EnrollmentIDorBillingAccountID , 1, []),
condition = Source{[Key="balancesummary"]}[Data],
#"Added Custom" = Table.AddColumn(condition, "Approved", each if Text.Contains([name], EnrollmentIDorBillingAccountID) then "Approved" else "Stop"),

Custom1 = if List.Max(Table.Column(#"Added Custom","Approved")) = "Approved" then EnrollmentIDorBillingAccountID else "0" meta [IsParameterQuery=true, Type="Any", IsParameterQueryRequired=true],
 
FilePath = "abc%2FDataTable1",
PathEncode = Uri.EscapeDataString(FilePath) ,
RelPath = Custom1 & "/" & FilePath,

Custom2 = Csv.Document(Web.Contents("https://*******/***", [RelativePath=RelPath]),[Delimiter=",", Columns=12, Encoding=1252, QuoteStyle=QuoteStyle.None]),
 
in Custom2
 
 
This report is created as a template app and installed . After installation customer clicks on "Connect your data" option. Then template app will provide data source configuration screens. First screen for ACM configuration and the second for Web. Here even though I am giving the correct valid credentials, the refresh is failing with the reason " data source credentials are invalid". Then I am re-configuring the data sources and going for a manual refresh, but then it is again failing with the same error with ACM. Once I reconfigure the data source credentials and go for a manual refresh then it is failing with the same error with Web connection now. I couldn't identify what is actually contributing to this irregular and random refresh failures (once with ACM and once with Web) and sometimes surprisingly the refreshes are successfully completing.
 
Can anybody help me in this to identify the connectivity issue and if there could be anything going wrong in the PBI backend which is not storing / missing/ overlapping the configured credentials with both the data sources?

Thanks
Lakshmi K

3 Replies

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

    Hi Anonymous 

    Can you test if connecting to the data sources in separate queries (one query connects to one data source), can they always be refreshed successfully in the service?

     

    Regards,
    Community Support Team _ Jing

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

       

      If the query has one data source then it works fine. But earlier we had these two data sources in one query only and it worked fine both in Power BI Service and Power BI Template Apps as well. Now the only difference is - they are the same data sources in one query (both ACM and Web) but Web connector is calling a Microservice API with OAuth. Earlier we used to call a Logic App's http get request in Web connector with Anonymous.

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

        Hi Anonymous 

        The reason is probably related to the Microservice API with OAuth authentication. From this idea (Microsoft Idea · oauth), it seems OAuth authentication is currently not supported when refreshing Web API data sources in Power BI Service. It says OAuth is enabled via custom connector. However, in custom connector doc, it says OAuth for custom connectors via gateways is currently supported only for gateway admins. Since you are using the report as a template app, custom connector is probably not a good workaround.

         

        I suggest that you can open a support ticket on https://support.powerbi.com. Scroll down and click "CREATE SUPPORT TICKET". The engineers there may help look into the issue from backend of the service.

         

        Regards,
        Community Support Team _ Jing