Forum Discussion

gjross's avatar
gjross
Icon for Advocate II rankAdvocate II
10 years ago
Solved

Connection String for Embedded report which uses DirectQuery

I have a PBIX which uses a Direct Query to a SQL Azure database. I have followed the steps in https://azure.microsoft.com/en-gb/documentation/articles/power-bi-embedded-get-started-sample to create a workspace etc and get to the point where it states "...run option 7 to update the connection strings". The downfall seems to be the connection string itself; I have tried 'xxxx.database.windows.net: databasename' or 'Server=xxxx.database.windows.net; Database=databasename'.

 

What is the correct format for the connection string?

 

 

 

11 Replies

  • Hey, I also am having a problem here, just wondering, did you find the right format ? or a workaround ?

    • gjross's avatar
      gjross
      Icon for Advocate II rankAdvocate II

      I built a new workspace and ran the project again, this time, when running Option 7, I only updated the username and password. I hit enter to skip updating the connection string - and it worked.

  • This tutorial  How to use Power BI Embedded with REST helped me set the credential for my datasource. I was not able to set them using the option 7 of the provision example, I used a Rest client like PostMan  and followed the article  specifically the  part in  "Data Source Connectivity (and multi-tenacy of data)". 

    You can see the format of the connection string in the article.

     

     

  • A very useful article is How to use Power BI Embedded with REST under the heading "data source connectivity" I found

    very useful info how to set connection strings and set credential to the datasource. I could not make it using the provisioning sample option 7 and following the articles advise I used a rest client like PostMan  and send the requests,

     

    Hope I helped!

  • While designing the report use Direct query method instead of Import in Power BI desktop.

     

    And then import the Pbix file using Provisionsample command line .

     

    Finally update the dataset using the following connection string format:

     

    "Data Source=xxxx.database.windows.net;Initial Catalog=dbname;User ID=xxx;Password=xxxx;"

     

    It worked well for me. Hope it will help.

     

    Thank you.