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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
roblange
New Member

change report data sets programmatically

We have the following scenario we’re trying to support:

  1. Based on a user’s input our program generates result tables
  2. The program automatically creates an Azure SQL DB containing the result tables
  3. We created a PowerBI Template to present these results
  4. We want to let the user load the data into the template with one click
    1. We defined a QueryParameter with the DB name
    2. After the user inputs the DB name, we want the data from that DB to load

 

Problem:

We want the user not to have to deal with excessive authentication (like inputting a user/pass other than their own). We’re able to get SSMS to connect with active directory integration, but not via Power BI.

 

Questions:

What type of authentication can we get working inside an intranet (corpnet) with Power BI desktop and our Azure SQL DB?

 

Are we doing the right thing? Is there a better way to achieve what we’re trying to do programmatically (change report data sets programmatically)?

 

Thanks!

1 REPLY 1
Eric_Zhang
Microsoft Employee
Microsoft Employee

@roblange

 

In Power BI desktop, you can access the all database and save the credential in cache at the first time to connect. When connecting next time, you don't have to input credential again.

Why that much interaction with Power BI desktop? There's no any programming API for Power BI desktop.

Based on my understanding on your requirement, Power BI Embedded seems promising. You can set SetAllConnections to decide which DB is connected according to the connecting user.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.