Forum Discussion

Sylvester_OEC's avatar
Sylvester_OEC
Frequent Visitor
4 years ago
Solved

Couldn't load the data for this visual

Hi everyone!
I am using the PowerBI Pro TRIAL version and have a Direct Query connecting to Azure SQL server databases. I am able to build and successfully publish my report on the PowerBI service - it shows under a certain Workspace, so I'm assuming it's getting published.

However, when I try clicking on and viewing the report, it returns the following error:

"Couldn't load the data for this visual

Login failed for user '<token-identified principal>'. The server is not currently configured to accept this token.. The exception was raised by the IDbConnection interface.

Please try again later or contact support. If you contact support, please provide these details.

 

I'd appreciate any hint/ tips/ tricks on how to get this to work, as I'm not an expert in PowerBI and am still learning.

Thank you so much for your time!


  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Sylvester_OEC 

    Importand “Direct Query” are different in how data is acquired and stored . When you connect to Azure SQL database with Import mode , the data will be stored in your pbix file , and after you publishing the report to Service , the data is in the dataset .But if you connect to Azure SQL database with Direct Query mode , you get the data by sending query to your data source , in this situation , Service need to keep a connection with your data source , so you need to enable single sign-on (SSO) using Azure Active Directory (Azure AD) OAuth2 for your end users.

    Microsoft has an official document detailing how to connect to Azure SQL Database in Service , it will help you have a better understanding .

    https://docs.microsoft.com/en-us/power-bi/connect-data/service-azure-sql-database-with-direct-connect

     

    Best Regard

    Community Support Team _ Ailsa Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Sylvester_OEC 

    Importand “Direct Query” are different in how data is acquired and stored . When you connect to Azure SQL database with Import mode , the data will be stored in your pbix file , and after you publishing the report to Service , the data is in the dataset .But if you connect to Azure SQL database with Direct Query mode , you get the data by sending query to your data source , in this situation , Service need to keep a connection with your data source , so you need to enable single sign-on (SSO) using Azure Active Directory (Azure AD) OAuth2 for your end users.

    Microsoft has an official document detailing how to connect to Azure SQL Database in Service , it will help you have a better understanding .

    https://docs.microsoft.com/en-us/power-bi/connect-data/service-azure-sql-database-with-direct-connect

     

    Best Regard

    Community Support Team _ Ailsa Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Sylvester_OEC's avatar
      Sylvester_OEC
      Frequent Visitor

      Thanks so much for pointing me in the right direction. I was eventually able to get it to work, only this time I connected to Azure SQL db using 'Import' instead of 'Direct Query'.

  • Hey Sylvester_OEC ,

     

    I'm wondering if you use the same account that connects to the Azure SQL DB from Power BI Desktop and from Power BI Service?

     

    Power BI Service takes the user that authenticates against the Power BI Service and uses the account for authenticating against the Azure SQL DB.

     

    Another thing to check is if the Azure SQL Server allows access from other Azure Services like Power BI. Often this property is disabled.

    If this property is disabled, you can either enable it or use an on-premises gateway, then you can whitelist the ip of the gateway machine.

     

    Regards,

    Tom

  • Sylvester_OEC's avatar
    Sylvester_OEC
    Frequent Visitor

    Hey TomMartens ,

    Thank you so much for your response! 

    To answer few of your questions - 
    1. I use the same account to log into my PowerBI service and PowerBI desktop. 
    2. I am able to view other reports in the Workspace, that also uses a Direct Query connecting to the same Azure SQL server databases. So basically, I am able to view one report but just not the 2nd one.

    Looking forward to your kind suggestions/tips. I'm struggling with this for close to 3 weeks now.

    Thank you!

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Sylvester_OEC 

    Have you compared the differences between the two reports ?

     

    Best Regard

    Community Support Team _ Ailsa Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Sylvester_OEC's avatar
      Sylvester_OEC
      Frequent Visitor

      Hi,

      I actually did check, and here's what I found out.

      1. When I connect the PBI desktop to the Azure SQL databse using 'Import', I'm able to view reports that are published on the PBI service.

      2. When I connect the PBI desktop to the Azure SQL databse using 'Direct Query', I'm NOT able to view reports that are published on the PBI service.

      Here's want I'm aiming to accomplish - A way to connect to the Azure SQL database, using PBI Desktop, and then be able to publish them in a workspace on the PBI Service

      So, in order to do this, I felt connecting using' Direct Query' would help me keep the reports updated real time, as I wouldn't need to run the reports manually eachtime someone wanted to check the reports. But It didn;t work.