My custom connector's webhook trigger successfully creates subscriptions and returns a proper Location header, but Power Automate never calls the DELETE operation when flows are disabled or deleted. The issue appears to be related to using the X-MS-Capabilities gateway rewrite for dynamic host configuration.
When I turn off or delete a flow:
1. The subscription remains active in orphaned on my end
2. When I turn the flow back on, I get an error because the subscription URL already exists
3. No DELETE request appears in Workfront's logs
4. Power Automate seems not to attempt the DELETE at all
Please advise.
I found community posts suggesting that x-ms-capabilities gateway rewrite might break webhook lifecycle management,
specifically:
- https://community.powerplatform.com/forums/thread/details/?threadid=328f6d6c-3e22-46ae-a40f-ac92b1323e78 mentions
DELETE not being sent to the same host when using "Set Host URL policy template"
- Multiple reports of DELETE calls not being made with dynamic host configurations
Questions
1. Is there a known limitation where x-ms-capabilities gateway rewrite prevents automatic webhook DELETE calls?
2. For multi-tenant scenarios where each user has a different API host, what is the recommended approach to enable
proper webhook lifecycle management?
3. Are there any workarounds or alternative configurations that support both:
- Dynamic host configuration per connection
- Automatic webhook cleanup on flow disable/delete
4. Is this expected behavior, and should multi-tenant webhook connectors rely on manual cleanup operations instead?