skip to Main Content

I have to create a workflow using standard Azure Logic App.

I am trying to authenticate Azure BLOB connector using connection string. One of the easiest way is to add connection string directly but manual intervention is required whenever there is a change in key and also it is not a secured way to authenticate any connector.

Another approach is to use the secrets from key vault. I created a parameter after adding secret in application setting but I am getting error. I read Microsoft documentation but haven’t find any workaround to use secrets to authenticate connectors.


I have added new app setting variable

@Microsoft.KeyVault(SecretUri=https://keyVault.vault.azure.net/secrets/adlsgen2-key/)

Define parameter as –

{
    "BLOB": {
        "type": "String",
        "value": "@appsetting('ADLS-Gen2')"
    }
}

Used this parameter in connector for authentication –

@parameters('BLOB')

getting error message –

Encountered internal server error. The tracking Id is
‘90762e8c-a5a9-4c75-be48-8446cef83c98’.


Need help to understand how to use secrets to authenticate connectors.

Thanks in advance.

2

Answers


  1. Instead of using parameters (such as @parameters('BLOB')) in your connections.json file, please try using application settings (such as @appsetting('ADLS-Gen2')) directly.

    Login or Signup to reply.
  2. This is an example from my own project. Use @appsetting into of @parameters. You need to point straight to the appsetting.

    {
      "serviceProviderConnections": {
        "sql": {
          "parameterValues": {
            "connectionString": "@appsetting('SqlConnectionString')"
          },
          "parameterSetName": "connectionString",
          "serviceProvider": {
            "id": "/serviceProviders/sql"
          },
          "displayName": "pca-dw"
        },
        "AzureBlob": {
          "parameterValues": {
            "connectionString": "@appsetting('AzureStorageConnectionString')"
          },
          "parameterSetName": "connectionString",
          "serviceProvider": {
            "id": "/serviceProviders/AzureBlob"
          },
          "displayName": "lsl-storage-blob"
        }
      },
      "managedApiConnections": {}
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search