trying to create outlook 365 api connector through ARM produces "API not found" error

Dennis Swenson 0 Reputation points
2024-03-06T17:48:30.41+00:00

trying to create an Outlook 365 connector using ARM template. I am missing something, but cannot figure out what. when I execute, I get the following result. I tried different names like office365, office365-1. I believe it has to do with the id: field. I am novice at ARM, code below should prove that.

error:
{

    "status": "Failed",

    "error": {

        "code": "ApiNotFound",

        "message": "The API 'laOfficeCon' could not be found."

    }

}

redacted code:

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "supscriptionID": {
            "defaultValue": "xxxxx",
            "type": "string",
            "metadata": {
                "description": "The Azure supscription ID."
            }
        },        
        "LpgicAppResourceGroup": {
            "defaultValue": "rg-fhlbtest",
            "type": "string",
            "metadata": {
                "description": "The Resource Group name where the logic app will be deployed."
            }
        },
        "LogicAppName": {
            "defaultValue": "la-bigtest-01",
            "type": "String",
            "metadata": {
                "description": "The logic app name."
            } 
        },
        "connections_office365_1_name": {
            "defaultValue": "office365",
            "type": "String",
            "metadata": {
                "description": "The name of the Outlook 365 connector to create."
            } 
        },
        "connections_office365_1_display_name": {
            "defaultValue": "user@company.com",
            "type": "String",
            "metadata": {
                "description": "The name of the Outlook 365 connector to create."
            } 
        },
         "location": {
            "type": "string",
            "defaultValue": "northcentralus",
            "metadata": {
                "description": "The region for the logic app deployment"
            }
        },
             "createdBy": {
            "type": "string",
            "defaultValue": "LastnameF",
            "metadata": {
                "description": "Provide your fhlb login name"
            }
        },
        "creationDate": {
            "type": "string",
            "defaultValue": "01/23/45",
            "metadata": {
                "description": "Provide creation date"
            }
        },
        "purpose": {
            "type": "string",
            "defaultValue": "TST subscription setup for logic apps D&A",
            "metadata": {
                "description": "Provide creation purpose"
            }
        }
    },
    "variables": {},
    "resources": [
        {
            "type": "Microsoft.Web/connections",
            "apiVersion": "2016-06-01",
            "name": "[parameters('connections_office365_1_name')]",
            "location": "[parameters('location')]",
            "tags": {
                "Created By": "[parameters('createdBy')]",
                "Created Date": "[parameters('creationDate')]",
                "purpose": "[parameters('purpose')]"
            },
            "kind": "V1",
            "properties": {
                "displayName": "[parameters('connections_office365_1_display_name')]",
                "statuses": [
                    {
                        "status": "Connected"
                    }
                ],
                "customParameterValues": {},
                "nonSecretParameterValues": {},
                "api": {
                    "name": "[parameters('connections_office365_1_name')]",
                    "displayName": "[parameters('connections_office365_1_display_name')]",
                    "description": "Microsoft Office 365 is a cloud-based service that is designed to help meet your organization's needs for robust security, reliability, and user productivity.",
                    "iconUri": "https://connectoricons-prod.azureedge.net/releases/v1.0.1676/1.0.1676.3617/office365/icon.png",
                    "brandColor": "#0078D4",
//                    "id": "/subscriptions/xxxxx/providers/Microsoft.Web/locations/northcentralus/managedApis/laOfficeCon",
//                    "id": "/subscriptions/xxxxxx/providers/Microsoft.Web/locations/northcentralus/managedApis/office365",
                    "id": "[concat('/subscriptions/',parameters('supscriptionID'),'/providers/Microsoft.Web/locations/',parameters('location'),'/managedApis/',parameters('connections_office365_1_name'))]",
//                    "id": "[concat('/subscriptions/xxxxx/providers/Microsoft.Web/locations/',parameters('location'),'/managedApis/office365-1')]",
                    "type": "Microsoft.Web/locations/managedApis"
                },
                "testLinks": [
                    {
                        "requestUri": "[concat('https://management.azure.com:443/subscriptions/',parameters('supscriptionID'),'/resourceGroups/',parameters('LpgicAppResourceGroup'),'/providers/Microsoft.Web/connections/', parameters('connections_office365_1_name'), '/extensions/proxy/testconnection?api-version=2016-06-01')]",
                        "method": "get"
                    }
                ]
            }
        }
    ]
}
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,816 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vishesh Sanghvi 0 Reputation points
    2024-03-06T18:26:32.1633333+00:00

    The error message indicates that the API 'laOfficeCon' could not be found. It seems there might be a mismatch between the API name specified in your ARM template and the actual API name for Outlook 365 connector.

    "api": {

    "name": "[parameters('connections_office365_1_name')]",
    
    "displayName": "[parameters('connections_office365_1_display_name')]",
    
    "description": "Microsoft Office 365 is a cloud-based service that is designed to help meet your organization's needs for robust security, reliability, and user productivity.",
    
    "iconUri": "https://connectoricons-prod.azureedge.net/releases/v1.0.1676/1.0.1676.3617/office365/icon.png",
    
    "brandColor": "#0078D4",
    
    "id": "[concat('/subscriptions/',parameters('supscriptionID'),'/providers/Microsoft.Web/locations/',parameters('location'),'/managedApis/',parameters('connections_office365_1_name'))]",
    
    "type": "Microsoft.Web/locations/managedApis"
    

    },

    However, the value of parameters('connections_office365_1_name') might not match the actual API name. You should ensure that the API name specified matches the correct name for the Outlook 365 connector. Double-check the API name in the Azure portal or documentation to ensure accuracy.

    Additionally, you may want to verify that the API is available in the specified Azure region (parameters('location')).

    Once you've confirmed the correct API name and ensured its availability in the specified region, update the value of parameters('connections_office365_1_name') accordingly in your ARM template. This should resolve the "API not found" error.

    0 comments No comments