Azure / Azure/Azure-DataFactory
Deployment of Web Connection LinkedService fails using User Assigned Managed Identity with BadRequest
- Dominant language
- PowerShell
- Stars
- 529
- Forks
- 623
- PR merge metrics
- No merged PRs in 30d
Description
While trying to deploy a DataFactory linked service of type "Web Connection" using a user assigned managed identity results in the following error. It looks like the credential is an object and not a string. The schema might be wrong or the encryption requirement may not match the schema. I get the same result in the portal as when doing an ARM template deployment.
``
{
"code": "BadRequest",
"target": "/subscriptions/--------/resourceGroups/------------/providers/Microsoft.DataFactory/factories/---------/linkedservices/OrchestratorConnection",
"message": "Failed to encrypt sub-resource payload {\r\n \"Id\": \"/subscriptions/--------/resourceGroups/--------/providers/Microsoft.DataFactory/factories/--------/linkedservices/OrchestratorConnection\",\r\n \"Name\": \"OrchestratorConnection\",\r\n \"Properties\": {\r\n \"annotations\": [],\r\n \"type\": \"WebConnection\",\r\n \"typeProperties\": {\r\n \"url\": \"********************\",\r\n \"enableServerCertificateValidation\": \"********************\",\r\n \"aadResourceId\": \"********************\",\r\n \"credential\": \"********************\",\r\n \"authenticationType\": \"********************\",\r\n \"**encryptedCredential\": \"********************\"\r\n** }\r\n }\r\n}
}
`
and error is: Failed to convert the value in 'credential' property to 'System.String' type. Please make sure the payload structure and value are correct.."
ARM template example:
`
{
"name": "[concat(parameters('factoryName'), '/OrchestratorConnection')]",
"type": "Microsoft.DataFactory/factories/linkedServices",
"apiVersion": "2018-06-01",
"properties": {
"annotations": [],
"type": "WebConnection",
"typeProperties": {
"url": "[parameters('OrchestratorConnection_properties_typeProperties_url')]",
"enableServerCertificateValidation": true,
"aadResourceId": "[parameters('OrchestratorConnection_properties_typeProperties_aadResourceId')]",
"credential":
{
"referenceName": "[parameters('OrchestratorUami').Name]",
"type": "CredentialReference"
},
"authenticationType": "UserAssignedManagedIdentity"
}
},
"dependsOn": [ ]
}
`
Contributor guide
Assessment
This issue has not been assessed yet.