Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

Unable to get 'Set host URL' policy to work

(0) ShareShare
ReportReport
Posted on by 33

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?

 

  • dmorland Profile Picture
    dmorland 33 on at
    Re: Unable to get 'Set host URL' policy to work

    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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard

Featured topics