I am trying to create an api connection for my logic app to an azure database using the system assigned managed identity from an ARM template. I found that for managed identity you had to add the parameterValueType: alternative (suggestion for event grids). Only this does not work and results in the error:
Parameter value type cannot be set to 'Alternative' because managed identity is not supported in the API definition's
This is the template I use for this:
{
"type": "Microsoft.Web/connections",
"apiVersion": "2016-06-01",
"name": "[parameters('connections_sql_name')]",
"location": "westeurope",
"kind": "V1",
"properties": {
"displayName": "SQL",
"statuses": [
{
"status": "Ready"
}
],
"customParameterValues": {},
"nonSecretParameterValues": {},
"api": {
"id": "[concat('/subscriptions/',subscription().subscriptionId,'/providers/Microsoft.Web/locations/',parameters('logicAppLocation'),'/managedApis/sql')]"
},
"parameterValueType": "Alternative"
}
}, {
"type": "Microsoft.Logic/workflows",
"apiVersion": "2017-07-01",
"name": "[parameters('logicAppName')]",
......
How do i change my template to use the system managed identity?
It seems that the documentation from microsoft on this subject is a bit lacking. I found a way how to atleast deploy the logic app in its entirety. Although the logic app says the connection is not correct. Which is weird in my opnion. But deploing is atleast something. The awnser given in this github post did the trick. Replacing parameterValueType with below makes the logic app deploy atleast.
parameterValueSet: {
name: 'oauthMI'
values: {}
}