Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Power Automate , Custom Connector's set host policy not working

(1) ShareShare
ReportReport
Posted on by 5

Hi

I would like to ask you how do you use set host policy in custom connector because in my case it does not work. I am wondering if am using it right.

Firstly I prepared simple dummy REST API, I used Swagger version 2 to document available endpoints. One of the endpoint is simple HTTP GET that takes as a paramter string host from query and returns hello world string to power automate. I also have installed on-premise data gateway in order to call this endpoint through the gateway. After that I created connector by uploading swagger json file to custom connector, I added policy "set host url" for all available operations. In the template URL I put @queryParameters('host') where host is the query parameter that is required. 

In Power automate flow that uses custom connector I specified by hardcoded host url that should replace that initial one specified in custom connector however it does not work. I am receiving internal error but not from my application. It comes probably from some Microsoft internal API. When I remove policy and put as host url in the very beginning window of custom connector configuration, flow starts working so it shows that there is connectivity power automate - gateway - my custom api. 

1) 3021.Screen-Shot-2020_2D00_12_2D00_06-at-16.16.57.png

2)6644.Screen-Shot-2020_2D00_12_2D00_06-at-16.17.43.png

3)5265.Screen-Shot-2020_2D00_12_2D00_06-at-16.23.26.png

4)3438.Screen-Shot-2020_2D00_12_2D00_06-at-17.03.37.png

5)1602.Screen-Shot-2020_2D00_12_2D00_06-at-17.03.43.png

and once again after removing policy and setting the same IP address to custom connector host configuration flow starts working however I need working policy because this will allow me to specify dynamically host of this API depends on environment (DEV/TEST/PREPROD/PROD)

Did you have similiar isssue ? Do you have some advise ? 

Some references 

- suported expressions in policies docs.microsoft.com/.../expressions

  • NickTT Profile Picture
    5 on at
    RE: Power Automate , Custom Connector's set host policy not working

    Looking for the same thing... I have a connection property defined and working correctly per connection by following this article: www.philcole.org/.../

    However since I am using the internal gateway, it can't resolve the host:

    {

     "error": {

       "code": 500,

       "message": "The remote name could not be resolved: 'myinternalserver.domain.fqdn'",

       "source": "msmanaged-na.azure-apim.net",

       "path": "forward-request",

       "policyId": ""

     }

    }

  • Ernst Profile Picture
    on at
    RE: Power Automate , Custom Connector's set host policy not working

    We have the same problem, any news on this issue?

  • Carl Esp Profile Picture
    5 on at
    RE: Power Automate , Custom Connector's set host policy not working

    Hi, had you got working this? I have the same problem. Thank you

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106 Most Valuable Professional

#3
Eugen Podkorytov Profile Picture

Eugen Podkorytov 102

Overall leaderboard

Product updates

Dynamics 365 release plans