Powershell Set-AzSynapseLinkedService returns error Object reference not set to an instance of an object
I'm trying to migrate a known-working Data Factory solution to an Azure Synapse Workspace. I'm getting the "object reference not set to an instance of an object" error on using Powershell to deploy one of my linked services.
I've done a similar deployment before with Data Factory with no issues. Here, I'm getting issues deploying one of my linked services and it's preventing me from auto-deploying the rest. The self-hosted runtime deployed fine. 11 of 12 linked services deployed fine.
However, our databricks connection will not deploy (with the same code in a loop) via the powershell command:
Set-AzSynapseLinkedService -WorkspaceObject $ws -DefinitionFile $ls -Name $ls.BaseName
I've deployed the Databricks linked service with the same file and the equivalent DataFactoryV2 Powershell command. I tried creating it in the Workspace portal by pasting in the JSON from the file, and that worked fine. When it saved, it added the autoresolveintegrationruntime reference to the json when I saved it in the workspace. This seems to be an error with the Powershell command, not an absolute barrier to deployment. I saved off the json with the runtime info to a file. Then I deleted the linked service from the portal and tried to deploy with the revised json file. It was still not working.
Here's the databricks JSON. (filename = ls_azure_databricks.json)
{
"name": "ls_azure_databricks",
"properties": {
"annotations": [],
"type": "AzureDatabricks",
"typeProperties": {
"domain": {
"type": "AzureKeyVaultSecret",
"store": {
"referenceName": "ls_keyvault",
"type": "LinkedServiceReference"
},
"secretName": "kv-databricks-url"
},
"authentication": "MSI",
"workspaceResourceId": {
"type": "AzureKeyVaultSecret",
"store": {
"referenceName": "ls_keyvault",
"type": "LinkedServiceReference"
},
"secretName": "kv-databricks-workspace-resourceid"
},
"existingClusterId": {
"type": "AzureKeyVaultSecret",
"store": {
"referenceName": "ls_keyvault",
"type": "LinkedServiceReference"
},
"secretName": "kv-databricks-clusterid"
}
}
}
}
Any ideas?