Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi, I hope you can help me! How can i update my azure blob credentials in powerbi with SA access api (rest api) I keep getting a bad request.
foreach ($datasource in $datasources) {
Write-Host $datasource.DatasourceType
$gatewayId = $datasource.gatewayId
$datasourceId = $datasource.datasourceId
$ApiUrl = "https://api.powerbi.com/v1.0/myorg/gateways/$gatewayId/datasources/$datasourceId"
Write-Host "gatewayId $gatewayId"
Write-Host "datasourceId $datasourceId"
Write-Host "Patching url $datasourePatchUrl"
#Build the request body
$ApiRequestBody = @"
{
"credentialDetails": {
"credentialType": "Key",
"credentials": "{\"credentialData\":[{\"name\":\"key\", \"value\":\"ec....LA=\"}]}",
"encryptedConnection": "Encrypted",
"encryptionAlgorithm": "None",
"privacyLevel": "None"
}
}
"@
Invoke-PowerBIRestMethod -Url "gateways/$gatewayId/datasources/$datasourceId" -Method PATCH -Body $ApiRequestBody | ConvertFrom-Json -Verbose
}
Hi @baden27 ,
Please kindly refer to the similar post:
Solved: Re: Possible to update credentials via REST API? - Page 2 - Microsoft Power BI Community
The SET Credential API is for cloud datasources.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
77 | |
75 | |
67 | |
65 | |
47 |
User | Count |
---|---|
108 | |
106 | |
93 | |
84 | |
66 |