Invalid connection in designer after deploy of SQL connection
I have an issue after a deploy in a clean resource group for a managed SQL connection. The connections.json looks as follows:
"managedApiConnections": {
"synapse-api": {
"api": {
"id": "/subscriptions/@{appsetting('SUBSCRIPTION_ID')}/providers/Microsoft.Web/locations/westeurope/managedApis/sql"
},
"authentication": {
"identity": "@appsetting('MANAGED_IDENTITY_ID')",
"type": "ManagedServiceIdentity"
},
"connection": {
"id": "/subscriptions/@{appsetting('SUBSCRIPTION_ID')}/resourceGroups/@appsetting('ENVIRONMENT_RESOURCE_PREFIX')-rg-leadtocash-customer-01/providers/Microsoft.Web/connections/synapse-api"
},
"connectionProperties": {
"authentication": {
"audience": "https://database.windows.net/",
"identity": "@appsetting('MANAGED_IDENTITY_ID')",
"type": "ManagedServiceIdentity"
}
},
"connectionRuntimeUrl": "@{appsetting('CONNECTION_RUNTIME_URL')}"
}
},
After deploy, the connection works. When I open the designer it reports "Invalid connection". After I select the user assigned managed identity from the dropdown, a new connection is created in the connections.json file with the same content, except that appsettings are hardcoded. Then the designer is happy. Even if I deploy with hardcoded values the problem is the same. The API connection deploys fine and the access policy looks fine. I cannot see the difference between the connection which is deployed and the connection which is created using the portal. Did anyone had the same problem and found a way to solve it?