Open nbarichev opened 2 months ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @wonner, @v-yanjungao.
please use this as a workaround
#Create a linked service
$token=Get-AzAccessToken -ResourceUrl https://dev.azuresynapse.net/
$authHeader=@{
'Content-Type'='application/octet-stream'
'Authorization'='Bearer '+$token.Token
}
$workspaceName ="<your-worksapce-name>"
$linkedServiceName ="<your-linkedservice-name>"
$linkedServiceFile = "<your-linkedservice-definition-File>"
$json = Get-Content $linkedServiceFile
#Set linkedService
Invoke-WebRequest -Method PUT -Uri "https://${workspaceName}.dev.azuresynapse.net/pipelines/${linkedServiceName}?api-version=2019-06-01-preview" -Headers $authHeader -Body $json
Description
The
Set-AzSynapseLinkedService
command in PowerShell creates linked service of typeAzureSqlDW
with missing fields. The JSON file is copied from the Synapse workspace, tested, and successfully running (when created manually in the synapse workspace). The same behaviour applies to linked service of typeAzureSqlMI
.Also there is issue for these types for
az cli
, but unlike PowerShell moduleaz cli
fails with error and does not create linked service at all.Definition file that is provided to PowerShell command
json content displayed in synapse after command successfully executed without errors
Issue script & Debug output