question

KothaiRamanathan-7384 avatar image
0 Votes"
KothaiRamanathan-7384 asked KothaiRamanathan-7384 commented

Logic App API Connection Error : Storage account access key should be a correct base64 encoded string

I created a logic app with a storage api connection. However, I get this error : Storage account access key should be a correct base64 encoded string. I created the logic app through arm template.


If I edit the api connection, provide the same value again, initially it gives the same error, but after some time this error goes.

It would be helpful to know why this issue is coming up and how to overcome it.

Thanks.

azure-logic-apps
image.png (22.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered KothaiRamanathan-7384 commented

Hi @KothaiRamanathan-7384

Due to character limit posting as answer. Are you defining the "Microsoft.Web/connections" in your ARM templated or just referring the existing connection. As it looks like the value are not correctly specified in the Microsoft.Web/connections therefore when you reconfigure it works fine. For your reference sharing from the below from quick start templates.

  "resources": [
         {
             "type": "Microsoft.Web/connections",
             "apiVersion": "2018-07-01-preview",
             "name": "[parameters('storageConnectionName')]",
             "location": "[parameters('location')]",
             "dependsOn": [
                 "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName'))]"
             ],
             "properties": {
                 "api": {
                     "id": "[subscriptionResourceId('Microsoft.Web/locations/managedApis', parameters('location'), 'azureblob')]"
                 },
                 "parameterValues": {
                     "accountName": "[parameters('storageAccountName')]",
                     "accessKey": "[listKeys(variables('storageAccountId'), '2019-04-01').keys[0].value]"
                 },
                 "testLinks": [
                     {
                         "requestUri": "[uri(parameters('azureMgmtUri'), concat('subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Web/connections/', parameters('storageConnectionName'), '/extensions/proxy/testconnection?api-version=2018-07-01-preview'))]",
                         "method": "get"
                     }
                 ]
             }
         }
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks @MayankBargali-MSFT. The connection is defined in the same arm tempate, but while deploying I did not set the run time variable which holds the account key properly. Hence it did not get the value.

1 Vote 1 ·