Azure / Azure/azure-powershell

AzureMLService Linked Service which uses a System Assigned Managed ID created with Set-AzSynapseLinkedService is not picking up typeProperties.authentication

Open
#21,930 5 comments 1 reaction 0 assignees View on GitHub
act-codegen-extensibility-squad bug customer-reported Service Attention Synapse
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

### Description

Failure I'm seeing is like https://github.com/Azure/azure-powershell/issues/17288 but for Set-AzSyanpseLinkedService.

I would create a Linked Service to an Azure ML Workspace using Synapse Workspace's System Assigned Managed ID using the following definition.

```json
{
"name": "test",
"type": "Microsoft.Synapse/workspaces/linkedservices",
"properties": {
"type": "AzureMLService",
"connectVia": {
"referenceName": "AutoResolveIntegrationRuntime",
"type": "IntegrationRuntimeReference"
},
"annotations": [],
"typeProperties": {
"subscriptionId": "xxxxxxx",
"resourceGroupName": "myrg",
"mlWorkspaceName": "myaml",
"authentication": "MSI"
}
}
}
```

The cmdlet returns without errors.

However, I would get the error 9512 when I test the connection from the studio because ``"authentication":"MSI"`` property is missing from ``"typeProperties"``. I'm using 3.0.0 version of Az.Synapse.

![image](https://github.com/Azure/azure-powershell/assets/32003089/d24a18b8-6803-44d6-b210-dd9e8aeeb70d)

### Issue script & Debug output

```PowerShell
Set-AzSynapseLinkedService -WorkspaceName 'myaml' -Name 'test' -DefinitionFile $tempFile -Verbose
```

### Environment data

```PowerShell
Name Value
---- -----
PSVersion 7.3.4
PSEdition Core
GitCommitId 7.3.4
OS Microsoft Windows 10.0.xxxxx
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```

### Module versions

```PowerShell
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 2.12.3 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script 3.0.0 Az.Synapse {Add-AzSynapseDataFlowDebugSessionPackage, Add-AzSynapseTriggerSubscription, Clear-AzSynapseSqlPoolVulnerabilityAssessmentRuleBaseline, Convert-AzSynapseSqlPoolVulnerabilityAssessmentScan…}
```

### Error output

```PowerShell
Cmdlet succeed
```

Contributor guide

Open the contributing guide

Research direction

Run the supplied Set-AzSynapseLinkedService PowerShell reproduction with the AzureMLService definition first, then trace how the cmdlet handles typeProperties.authentication. Done means the generated linked service retains authentication set to MSI and the Synapse Studio connection test no longer returns error 9512.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.