Azure / logicapps

Azure Logic Apps labs, samples, and tools
MIT License
349 stars 291 forks source link

The provided ... identifier .... is malformed or invalid. #700

Closed erwinkramer closed 1 year ago

erwinkramer commented 1 year ago

Describe the Bug

The VSCode extension returns The provided subscription identifier '@{appSetting('WORKFLOWS_SUBSCRIPTION_ID')}' is malformed or invalid. on latest version of the extension, if i revert back to 1.0.25 it works. It was promised to be fixed, as stated here: https://github.com/Azure/logicapps/issues/527#issuecomment-1294208966 but no luck.

This is my connections file:

{
  "managedApiConnections": {
    "azuresentinel": "@parameters('azuresentinel_authentication')",
    "service-now": "@parameters('servicenow_authentication')",
    "office365": "@parameters('office365_authentication')",
    "arm": "@parameters('arm_authentication')"
  }
}

this is my parameters file:

{
  "arm_authentication": {
    "type": "object",
    "value": {
      "api": {
        "id": "/subscriptions/@{appSetting('WORKFLOWS_SUBSCRIPTION_ID')}/providers/Microsoft.Web/locations/westeurope/managedApis/arm"
      },
      "connection": {
        "id": "/subscriptions/@{appSetting('WORKFLOWS_SUBSCRIPTION_ID')}/resourceGroups/@{appsetting('WORKFLOWS_RESOURCE_GROUP_NAME')}/providers/Microsoft.Web/connections/connection_arm"
      },
      "connectionRuntimeUrl": "@appsetting('CONNECTOR_ARM_RUNTIMEURL')",
      "authentication": {
        "type": "Raw",
        "scheme": "Key",
        "parameter": "@appsetting('arm-connectionKey')"
      }
    }
  },
  "servicenow_authentication": {
    "type": "object",
    "value": {
      "api": {
        "id": "/subscriptions/@{appSetting('WORKFLOWS_SUBSCRIPTION_ID')}/providers/Microsoft.Web/locations/westeurope/managedApis/service-now"
      },
      "connection": {
        "id": "/subscriptions/@{appSetting('WORKFLOWS_SUBSCRIPTION_ID')}/resourceGroups/@{appsetting('WORKFLOWS_RESOURCE_GROUP_NAME')}/providers/Microsoft.Web/connections/connection_servicenow"
      },
      "connectionRuntimeUrl": "@appsetting('CONNECTOR_SERVICENOW_RUNTIMEURL')",
      "authentication": {
        "type": "Raw",
        "scheme": "Key",
        "parameter": "@appsetting('service-now-connectionKey')"
      }
    }
  },
  "azuresentinel_authentication": {
    "type": "object",
    "value": {
      "api": {
        "id": "/subscriptions/@{appSetting('WORKFLOWS_SUBSCRIPTION_ID')}/providers/Microsoft.Web/locations/westeurope/managedApis/azuresentinel"
      },
      "connection": {
        "id": "/subscriptions/@{appSetting('WORKFLOWS_SUBSCRIPTION_ID')}/resourceGroups/@{appsetting('WORKFLOWS_RESOURCE_GROUP_NAME')}/providers/Microsoft.Web/connections/connection_azuresentinel"
      },
      "connectionProperties": {},
      "connectionRuntimeUrl": "@appsetting('CONNECTOR_SENTINEL_RUNTIMEURL')",
      "authentication": {
        "type": "Raw",
        "scheme": "Key",
        "parameter": "@appsetting('azuresentinel-connectionKey')"
      }
    }
  },
  "office365_authentication": {
    "type": "object",
    "value": {
      "api": {
        "id": "/subscriptions/@{appSetting('WORKFLOWS_SUBSCRIPTION_ID')}/providers/Microsoft.Web/locations/westeurope/managedApis/office365"
      },
      "connection": {
        "id": "/subscriptions/@{appSetting('WORKFLOWS_SUBSCRIPTION_ID')}/resourceGroups/@{appsetting('WORKFLOWS_RESOURCE_GROUP_NAME')}/providers/Microsoft.Web/connections/connection_office365"
      },
      "connectionRuntimeUrl": "@appsetting('CONNECTOR_OFFICE365_RUNTIMEURL')",
      "authentication": {
        "type": "Raw",
        "scheme": "Key",
        "parameter": "@appsetting('office365-connectionKey')"
      }
    }
  }
}

I've also tried without curly brackets in the parameters.json, but no luck.

Im running the latest v4 function core tools, if that matters.

Plan Type

Standard

Steps to Reproduce the Bug or Issue

  1. Create a setup with connections.json and parameters.json coupling as shown above in vs code
  2. run the designer locally

Workflow JSON

No response

Screenshots or Videos

No response

Additional context

No response

AB#16654886

ccastrotrejo commented 1 year ago

Hi @erwinkramer thank you very much for raising this issue. I was able to repro it in the newest version. Will work on fixing it and will be done in the next version.

erwinkramer commented 1 year ago

@ccastrotrejo thanks for fixing, just tested and it works 🥇 . I'm looking forward to you solving the next issue i posted ... hehe

bkanda commented 3 months ago

@ccastrotrejo What was the fix for the above issue as I'm facing the similar issue on standard logicapp flow

ccastrotrejo commented 3 months ago

Hi @bkanda the fix for this issue was to resolve the connections references with the parameters and local.setting.json files. However, this is an old issue, and we changed our source code to a different repo. Since you are experiencing this issue again, could you please raise a github issue in the new repo? https://github.com/Azure/LogicAppsUX/issues