You probably need a policy. Use a bicep template. First, find the existing API connection and the existing logic app, and then use the bicep template
resource blobStorageAccessPolicy 'Microsoft.Web/connections/accessPolicies@2016-06-01' = {
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm deploying Logic App from Visual Studio with the API connection to custom connector. Unfortunately soon after the deployment API connection is giving me an Error. It works absolutely fine if I Authorize it manually.
From the properties I can see below error... missing token, however when I try to add the token to the ARM template it says token is not accepted.
"authenticatedUser": {},
"overallStatus": "Error",
"statuses": [
{
"status": "Error",
"target": "token",
"error": {
"code": "Unauthenticated",
"message": "This connection is not authenticated."
}
}
]
API Connection authentication is based on the user where Custom Connector is authenticated by Azure AD with clientId, secret and resource url in place. When I try to add them to the ARM it's also failing stating API Connection isn't authenticated with them... which is true.
I'm puzzled with this how to get this working. Here is my ARM template
{
"type": "MICROSOFT.WEB/CONNECTIONS",
"apiVersion": "2018-07-01-preview",
"name": "[parameters('LogicAppWorkflows_Connection_Name')]",
"location": "[parameters('logicAppLocation')]",
"properties": {
"api": {
"id": "[resourceId('Microsoft.Web/customApis', 'LogicAppWorkflows')]"
},
"displayName": "[parameters('LogicAppWorkflows_Connection_DisplayName')]",
"authenticatedUser": {
"name": "xxxxx@xxxx"
}
}
}
And API Connection Template
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"connections_LogicAppWorkflows_name": {
"defaultValue": "LogicAppWorkflows",
"type": "String"
},
"customApis_LogicAppWorkflows_externalid": {
"defaultValue": "/subscriptions/xxxxxxx/resourceGroups/xxxxxxx/providers/Microsoft.Web/customApis/LogicAppWorkflows",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Web/connections",
"apiVersion": "2016-06-01",
"name": "[parameters('connections_LogicAppWorkflows_name')]",
"location": "xxxxx",
"kind": "V1",
"properties": {
"displayName": "xxxxxxx@xxxxxxx",
"statuses": [
{
"status": "Error",
"target": "token",
"error": {}
}
],
"customParameterValues": {},
"nonSecretParameterValues": {},
"createdTime": "2021-11-26T15:21:49.1414968Z",
"changedTime": "2021-11-26T15:43:38.2629829Z",
"api": {
"name": "[parameters('connections_LogicAppWorkflows_name')]",
"displayName": "[parameters('connections_LogicAppWorkflows_name')]",
"description": "[parameters('connections_LogicAppWorkflows_name')]",
"iconUri": "/Content/retail/assets/default-connection-icon.e6bb72160664a5e37b9923c3d444444.2.svg",
"id": "[parameters('customApis_LogicAppWorkflows_externalid')]",
"type": "Microsoft.Web/customApis"
},
"testLinks": []
}
}
]
}
Any help appreciated, Thanks.
You probably need a policy. Use a bicep template. First, find the existing API connection and the existing logic app, and then use the bicep template
resource blobStorageAccessPolicy 'Microsoft.Web/connections/accessPolicies@2016-06-01' = {