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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (2,606)