web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Unable to get 'Set hos...
Power Automate
Unanswered

Unable to get 'Set host URL' policy to work

(0) ShareShare
ReportReport
Posted on by 53

I have some custom connectors that connect to a reverse proxy via on-premises gateway. The Base URL defined in each custom connector is used by the reverse proxy to redirect the request to the right endpoint. The Base URL value defined in the custom connector is the only thing unique to each custom connector. The custom connectors work fine.

To reduce the number of custom connectors, I want to be able to have just one custom connector where I pass the environment name as a header parameter and have it update the URL accordingly. I have tried using the ‘set host URL’ policy but I cannot get it to work.

Here is the configuration (names changed for privacy) I have:

Existing custom connector 1 – works ok
- Connect via on-premises data gateway enabled
- Scheme: HTTP
- Host: myhost
- Base URL: /env1

Existing custom connector 2 – works ok
- Connect via on-premises data gateway enabled
- Scheme: HTTP
- Host: myhost
- Base URL: /env2

New custom connector – not working
- Connect via on-premises data gateway enabled
- Scheme: HTTP
- Host: myhost
- Base URL: /

The policy I have created on the new custom connector is:
- Template: Set host URL
- Applies to all operations
- URL Template: http://myhost/@headers(‘env’)

On requests, I am passing a header called ‘env’ with value set to either ‘env1’ or ‘env2’

When I test the connector I get a 500 response with "The remote name could not be resolved: myhost"

Does anyone have a suggestion on how I can get this working?

 

Categories:
I have the same question (0)
  • dmorland Profile Picture
    53 on at

    I think I may have found the answer to my own question.  I just noticed this line in the documentation:

     

    "Note that this policy currently does not support Gateway urls."

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 573

#2
Valantis Profile Picture

Valantis 407

#3
11manish Profile Picture

11manish 387

Last 30 days Overall leaderboard