Forum Discussion

eamonnde's avatar
eamonnde
Frequent Visitor
8 years ago
Solved

Invalid connection credentials Refresh issue

Hi,

 

I've created two reports in power bi and published them to power bi online. I've also created an on premise data gateway on a device that is constantly running and added the corresponding gateways to the cluster in power bi online.

 

When I refresh the data online in report 1, the refresh runs without any issues. When i run a refresh on the report 2 i get an error back saying "Invalid connection credentials."

 

Apart from a different server name, the only difference that exits is that in edit permissions on power bi desktop, report 1 has the "Encrypt connection" option selected and report 2 doesn't.

 

Both files refresh and update in desktop but report 2 online provides the "Invalid connection credentials" error.

 

Any help would be appreciated

  • Hi Tim,

     

    Our issue seemed to revolve around the certificate not have the server name, we added it and it worked for us.

     

    Apologies for the delay in response.

    Eamonn

14 Replies

  • eaglewoods's avatar
    eaglewoods
    Frequent Visitor

    Dear all,

     

    Not sure, after so long if anyone has found the solution to this issue, but I was facing the same issue while refreshing PBI web services with an API token.

    As nobody mentioned the solution in this thread, I am including how i solved this issue.

    1) In PBI Desktop, I gave the API with the permanent token in the Advanced Editor. 

    2) In PBI webservices, I used this below settings.

    And this worked for me. The PBI webservices are now refreshing on demand and I can also schedule 8 refresh /day. PBI Pro user.

     

    Cheers!

    • Anonymous's avatar
      Anonymous
      Not applicable

      interesting.  These are exactly the same steps I'm following but my issue is not resolved.  may I ask if your url string contains any additional parameters?  ex: http://rest?param1=x&param2=z.

      My connection string within desktop is as follows: 

      Source = Json.Document(Web.Contents("https://xxx.yyy.com/api/xxx/yyy" & "?param1=false&param2=true&param3=true", [Headers=[#"my-api-key"="abcdefgkey1234"]]))

       

      thank you,

       

  • I'm currently connecting to a web data source using API Key passed as a header in my URL. Works fine in PowerBI desktop.

     

    I'm trying to create scheduled refresh using personal gateway however am getting invalid credentials error.

     

    Any idea's how to pass my API Key as part of the URL when adding my Web data source to gateway?

     

    Thanks,

     

    Lee

    • eamonnde's avatar
      eamonnde
      Frequent Visitor

      Hi Xiaoxin,

       

      The data is being directly imported from a SQL Server DB with a SQL query being used to import the data directly into Power BI.

       

      The credentials give me permission to pull the data into Power BI without any issues and the refresh option in Power BI desktop works fine, the same credentials are used in Power BI online to access the data through the gateway, all gateway connections are online and good to go.

       

      When i hit refresh on report 1 in Power BI online, all content refreshes without any issues, when i do the same for report 2 I get the following response.

       

       

      Thanks

      Eamonn

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi eamonnde,

         

        I'd like to suggest you double check dataset of reports, it seems like your credentials are dropped.

         

        In addition, which gateway you used? If you mean personal gateway, have you try to use on-premise version and try again?

         

        Regards,

        Xiaoxin Sheng

  • Anonymous's avatar
    Anonymous
    Not applicable

    Having the same innexplicable issue and unsurprised that after reading this entire thread, theres:

     

    1. No clear reason as to why this is happening (Something vague about a certificate?)

    2. No obvious solution

     

    Will keep digging I guess

  • florianh's avatar
    florianh
    Frequent Visitor

    I had the exact same issue. For me it worked to turn on the “skip test connection”. I use the following setting: