Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
julianmbs
Frequent Visitor

PowerBIClient.Datasets.GetGatewayDatasourcesAsync returns NULL

Hi,

 

I am trying to embed Power BI reports (using Direct Query) in my ASP.NET application, and get "Can't display the visual" message. I understand that I need to patch my data source credentials.

 

I am using this sample to provision my workspace, import reports, etc. Everything works great, except option #7 "Update connection string info for an existing dataset". Line 544 returns NULL into datasources variable, even though all three parameters are correct:

 

// Get the datasources from the dataset
var datasources = await client.Datasets.GetGatewayDatasourcesAsync(workspaceCollectionName, workspaceId, datasets.Value[datasets.Value.Count - 1].Id);

 

Any ideas what could be the problem?

 

Thanks,

Julia

7 REPLIES 7
jocaplan-MSFT
Microsoft Employee
Microsoft Employee

Are you using SQL in direct query mode?

Yes, as I stated above, I am using DirectQuery mode.

And SQL Azure? Getting null there means that your dataset didn't bind to any gateway. This should only happen if you are not using one of the supported sources.

It is SQL Azure. I have datasets for both SSAS and regular databases. When I upload the report to Power BI Online, it works fine, so the gateway is working.

We don't support the enterprise gateway yet so the source must be in the cloud. This rules out SSAS and on premise SQL.

Ok, so SSAS is out for now. Then it should at least work with Azure SQL database? It's not on premise.

Yep. That would working. We are currently working on adding support for the gateway. So SSAS will start to work in a little bit.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.