I am trying to deploy workflow into my Logic App standard, and I am getting this error:
Workflow 'wwwroot' validation and creation failed. Error: 'The API connection reference name 'demoonedrive' in action 'List_files_in_folder' is invalid. No managed connection found by the API connection reference name 'onedriveforbusiness-3' in connections.json file.'
Definition:
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"List_files_in_folder": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"referenceName": "myonedrive"
}
},
"method": "get",
"path": "/datasets/default/foldersV2/@{encodeURIComponent(encodeURIComponent('b!GBdMkudITki6B1h2X1w51jihOL.01VM26RYZ'))}",
"queries": {
"skipToken": "",
"top": 20
}
},
"runAfter": {},
"metadata": {
"b!GBdMkudITki6B1h2X1w51jihOL5Z2BF.01VM26RYZFIKFRJKCUGZVC5": "/DataSubmission"
}
},
"For_each": {
"type": "foreach",
"foreach": "@body('List_files_in_folder')?['value']",
"actions": {
"Get_file_content_using_path": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"referenceName": "myonedrive"
}
},
"method": "get",
"path": "/datasets/default/GetFileContentByPath",
"queries": {
"path": "@items('For_each')?['Path']",
"inferContentType": true
}
}
},
"Create_blob_(V2)": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"referenceName": "apiconnName"
}
},
"method": "post",
"body": "@body('Get_file_content_using_path')",
"headers": {
"ReadFileMetadataFromServer": true
},
"path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent('AccountNameFromSettings'))}/files",
"queries": {
"folderPath": "/medbills",
"name": "@items('For_each')?['Name']",
"queryParametersSingleEncoded": true
}
},
"runAfter": {
"Get_file_content_using_path": [
"SUCCEEDED"
]
},
"runtimeConfiguration": {
"contentTransfer": {
"transferMode": "Chunked"
}
}
},
"Delete_file": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"referenceName": "myonedrive"
}
},
"method": "delete",
"path": "/datasets/default/files/@{encodeURIComponent(encodeURIComponent(items('For_each')?['FileLocator']))}"
},
"runAfter": {
"Create_blob_(V2)": [
"SUCCEEDED"
]
}
}
},
"runAfter": {
"List_files_in_folder": [
"SUCCEEDED"
]
}
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"triggers": {
"Recurrence": {
"type": "Recurrence",
"recurrence": {
"interval": 3,
"frequency": "Minute",
"timeZone": "Eastern Standard Time"
}
}
}
},
"connectionReferences": {
"myonedrive": {
"connection": {
"id": "/subscriptions/id/resourceGroups/rg/providers/Microsoft.Web/connections/myonedrive"
},
"connectionName": "myonedrive",
"api": {
"id": "/subscriptions/id/providers/Microsoft.Web/locations/eastus/managedApis/myonedrive"
},
"authentication": {
"type": "ManagedServiceIdentity"
}
},
"apiconnName": {
"connection": {
"id": "/subscriptions/id/resourceGroups/rg/providers/Microsoft.Web/connections/apiconnName"
},
"connectionName": "apiconnName",
"api": {
"id": "/subscriptions/id/providers/Microsoft.Web/locations/eastus/managedApis/apiconnName"
},
"authentication": {
"type": "ManagedServiceIdentity"
}
}
},
"parameters": {}
}
Here is connections.json
{
"managedApiConnections": {
"apiconnName": {
"api": {
"id": "/subscriptions/id/providers/Microsoft.Web/locations/eastus/managedApis/apiconnName"
},
"authentication": {
"type": "ManagedServiceIdentity"
},
"connection": {
"id": "/subscriptions/id/resourceGroups/rg/providers/Microsoft.Web/connections/apiconnName"
},
"connectionRuntimeUrl": "link"
},
"myonedrive": {
"api": {
"id": "/subscriptions/id/providers/Microsoft.Web/locations/eastus/managedApis/myonedrive"
},
"authentication": {
"type": "ManagedServiceIdentity"
},
"connection": {
"id": "/subscriptions/id/resourceGroups/rg/providers/Microsoft.Web/connections/myonedrive"
},
"connectionRuntimeUrl": "link"
}
}
}