Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am trying to set up a release pipeline in Azure DevOps to publish a PowerBI report. I followed this instruction: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/CICD-Pipeline-for-PowerBI-Reports-Azure-...
and it all worked fine.
However, I have added a second datasource to my report and now I can't get the pipeline to run. It keeps failing at the 'update datasource credentials' task.
The first datasource is an Azure SQL database (credentialType = 'basic'). The second datasource is an Azure blob-storage (credentialType ='key').
Is it possible to use differente datasources and how do I update the credentials for the second datasource? I have tried to get it to work with only the blob-storage source, but that didn't work either.
This is the Powershell code I use with only one datasource:
$workspacename="workspace"
$datasetname="dataset"
## user credentials
$clientsec = "$(client_secret)" | ConvertTo-SecureString -AsPlainText -Force
$credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:client_id, $clientsec
Connect-PowerBIServiceAccount -ServicePrincipal -Credential $credential -TenantId $env:tenant_id
##Getworksapce
$workspace =Get-PowerBIWorkspace -Name $workspacename
## GetDataSets
$DatasetResponse=Invoke-PowerBIRestMethod -Url "groups/$($workspace.id)/datasets" -Method Get | ConvertFrom-Json
## Get DataSet
$datasets = $DatasetResponse.value
foreach($dataset in $datasets){
if($dataset.name -eq $datasetname){
$datasetid= $dataset.id;
break;
}
}
Invoke-PowerBIRestMethod -Url "groups/$($workspace.id)/datasets/$($datasetid)/Default.TakeOver" -Method Post
## update data source credentials
$BoundGateway=Invoke-PowerBIRestMethod -Url "groups/$($workspace.id)/datasets/$($datasetid)/Default.GetBoundGatewayDataSources" -Method GET | ConvertFrom-Json
$UpdateUserCredential = @{
credentialType ="Basic"
basicCredentials = @{
username= '$(username)'
password= '$(secret)'
}
} | ConvertTo-Json
$response=Invoke-PowerBIRestMethod -Url "gateways/$($BoundGateway.value.gatewayId)/datasources/$($BoundGateway.value.id)" -Method PATCH -Body $UpdateUserCredential | ConvertFrom-Json
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
7 | |
7 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |