1

I have Visual Studio 2019 16.10.4 and Azure Logic Apps Tools for Visual Studio 2019 2.24.2

I have created a Logic App by first going to the portal and getting a simple skeleton trigger that listens on an Event Grid Topic and connects using a Managed Identity.

I then copy the json over to my Visual Studio project.

Once in Visual Studio if I deploy the ARM template (note I deploy the ARM template using a simple powershell script and not the one generated by the tool but that should not matter) everything works as I expect, I get the API Connection, Logic App, and Event Grid Trigger all created so I am happy that the contents of the ARM template and parameters file all work as I expect.

The issue I face is that when I open the Logic App in the Logic App designer the tool seems to remove the managed identity code from the json and then the tool spits out an error in the output window.

If I can try to explain.

This is the code in the raw json file before I open in the designer:

      "$connections": {
        "value": {
          "azureeventgrid": {
            "id": "[concat(subscription().id, '/providers/Microsoft.Web/locations/', parameters('LogicAppLocation'), '/managedApis/', 'azureeventgrid')]",
            "connectionId": "[resourceId('Microsoft.Web/connections', parameters('azureeventgrid_1_Connection_Name'))]",
            "connectionName": "[parameters('azureeventgrid_1_Connection_Name')]",
            "connectionProperties": {
              "authentication": {
                "type": "ManagedServiceIdentity"
              }
            }
          }
        }
      }

When I open in the designer I see this error message in the Output window:

The workflow connection parameter 'azureeventgrid' is not valid. The API connection 'azureeventgrid' is configured to support managed identity but the connection parameter is either missing 'authentication' property in connection properties or authentication type is not 'ManagedServiceIdentity'.

And then when I look at the raw json this is what now appears:

      "$connections": {
        "value": {
          "azureeventgrid": {
            "id": "[concat(subscription().id, '/providers/Microsoft.Web/locations/', parameters('LogicAppLocation'), '/managedApis/', 'azureeventgrid')]",
            "connectionId": "[resourceId('Microsoft.Web/connections', parameters('azureeventgrid_1_Connection_Name'))]",
            "connectionName": "[parameters('azureeventgrid_1_Connection_Name')]"
            }
          }
        }
      }

So it appears as if the tool is not happy with some part of my code and removes it.

I then do my work, close the designer, open the raw json, copy back in the removed connectionProperties and deploy. So I do have a workaround but it is a bit tedious to have to do this all the time.

Is this a known issue? For example I can see that the designer does not seem to allow me to create a logic app with a trigger to event grid that uses Managed Identity (hence why I started out by creating a skeleton in the portal and copying the code over).

finarne
  • 51
  • 6
  • While I cannot help you with your question (I develop in Azure Portal, not in VS), you seem to have been able to create a Manage Identity-based Event Grid API Connection from an ARM template successfully. I'd appreciate if you could share your API Connection template in this question, that would be a great help: https://stackoverflow.com/questions/65915994/arm-template-for-event-grid-api-connection-with-managed-identity – 10p Aug 03 '21 at 09:10
  • 1
    @10p I've added a comment to the other post. – finarne Aug 12 '21 at 14:42
  • I've just hit this same problem, I don't suppose you found a solution did you? – Alan Oct 24 '22 at 10:22

0 Answers0