Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Connector Development
Unanswered

Environment Variables in Custom connector not working in policy templates

(1) ShareShare
ReportReport
Posted on by 40

I tried following  but no success :

  • Used Environemt variable in policy templates and it didnt work.
  • Added a query param "que" with value  @environmentVariables("new_envabc") , then used "Set HostUrl"  policy template with Url template value @queryParameters("que") But it didnt work.
Categories:
  • Ashish-_- Profile Picture
    40 on at
    Re: Environment Variables in Custom connector not working in policy templates

    Thanks ! This article https://powerautomate.microsoft.com/en-us/blog/environment-variables-in-custom-connectors/  in the last section also talks about limitation on environment variables in custom connector.

    Thus environment variable can only be used in hosturl , baspath and connection parameters . Also while saving/updating only updated environment variable values gets reflected in it otherwise it uses old values only.

  • hjaf Profile Picture
    486 on at
    Re: Environment Variables in Custom connector not working in policy templates

    I do not think it is possible, but I can't find information on this limitation.
    Documentation on policy do not clarify if it supports environment variables or not (or this limitation is omitted). And because referring to variables that does not exist produces an error, but correctly referring to an existing variable do not produce an error, it may imply that variables can be used. Only when running tests you realize that whatever property the policy affects is blank.


    The question about variables in the documentation has been raised before, but was pointed to this forum not sure if this has been answered in here, but the documentation has not changed as far as I can see:
    https://github.com/MicrosoftDocs/BusinessApplicationPlatform-Connectors-public/issues/489

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

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

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Featured topics