Forum Discussion
ilav
6 years agoFrequent Visitor
Can't select Maps To in Gateway setting via API/Powershell
Hello - I have a dataset which successfully connects to an azure DB via gateway when configured manually. However, when trying to configure the dataset via powershell, unable to select the gateway in...
mbutler71
Advocate I
5 years agoHaving the same issue, anyone else able to solve this?
DevOps deploys the "Report" Dataset successfully.
DevOps updates the datasource in the "Report" Dataset successfully.
The Gateway Connection in the "Report" Dataset loses it's mapping to a 'datasource' in the On-Premise Gateway.
Anonymous
5 years agoNot applicable
Hi mbutler71,
I was able to select the Map To field with the following:
# TRY TO BIND
$bindUrl = 'datasets/<ReplaceWithYourGatewayId>/Default.BindToGateway'
$postBindParams = @{
gatewayObjectId = "yourGatewayId"
datasourceObjectIds =@(
"yourDataSourceId"
)
} | ConvertTo-Json
write-host $postBindParams
Invoke-PowerBIRestMethod -Url $bindUrl -Method Post -Body $postBindParams -ContentType $content -Verbose