cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cagee
Frequent Visitor

using x-ms-apimTemplateParameter.urlTemplate, connector does not send webhook Delete request

We have built a connector that will be used by multiple host urls. When users create a connection for our connector, they will choose the host from the available option. 
For this we use x-ms-apimTemplateParameter.urlTemplate in apiProperties of our custom connector, which enables users to choose from API hosts addresses when they make a connection.

{
  "properties": {
    "connectionParameters": {
      "apiUrl": {
        "type": "string",
        "uiDefinition": {
          "constraints": {
            "required": "true",
            "tabIndex": 2,
            "allowedValues": [
              {"text": "Preprod", "value": "https://preprod.ourdomain.com"},
              {"text": "Test", "value": "https://test.ourdomain.com"}
            ]
          },
          "description": "Specifies the API Server URL that this connection will be used with.",
          "displayName": "Account hosted on",
          "tooltip": "Specifies the API Server URL that this connection will be used with."
        }
      },
    "iconBrandColor": "#7eac00",
    "capabilities": [],
    "policyTemplateInstances": [
      {
        "templateId": "dynamichosturl",
        "title": "API Server URL",
        "parameters": {
          "x-ms-apimTemplateParameter.urlTemplate": "@connectionParameters('apiUrl')/api"
        }
      }
    ]
  }
}

 

Every trigger, action and test works well when we create different connections for different hosts except that when user deletes a Flow or turns them off, the connector does not send delete webhook call to API if the host url of connection does not match the one in the apiDefinition.swagger.json file. 

  "host": "preprod.ourdomain.com"

The delete works only with the hosts that have their url in the swagger file as the main host url.

To test the theory we updated the host url in the connector's swagger file to the other host (test.ourdomain.com) and the delete calls are sent as soon as we update the connector, but then the other host does not send the delete calls. 


The delete Location headers are of course correctly sent as they work as soon as we change the host in the swagger file. This is 2 samples:

https://preprod.ourdomain.com/api/hook/v1/{hookId}
https://test.ourdomain.com/api/hook/v1/{hookId}



Can/should we choose a list of host names in the swagger file?
Do we need to set something else to be able to use the dynamic host policy feature and have the delete work properly?

0 REPLIES 0

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,246)