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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
mmccarver
Frequent Visitor

Service principal as datasource credentials - Microsoft.PowerBI.Api - UpdateDatasourceAsync

Can power bi connect to Azure sql databases using managed identity or service principal? What CredentialsBase does it use? The SDK only has: Anonymous, Basic, Key, Windows, and OAuth2 

 

We are implementing a multi-tenat solution for power bi embedded in Azure. We have a service principal account. We are using the SDK to create profiles, workspaces, and import reports.

 

Each new tenant gets the same reports: ReportA, ReportB, ReportC. These .pbix files are developed on sample data and imported for each tenant added. 

 

We need to update the datasource for each report using : 

 

 

pbiClient.Gateways.UpdateDatasourceAsync

 

 

and passing something like...

 

 

          var req = new UpdateDatasourceRequest
            {
                CredentialDetails = "myServicePrincipal",
                DatabaseName = "myDatabaseName"
            };

 

 

And of course we would repeat this process for every tenant added.

 

0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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