Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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 |
---|---|
98 | |
90 | |
84 | |
71 | |
67 |
User | Count |
---|---|
114 | |
103 | |
100 | |
72 | |
64 |