Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - Customize & Extend
Answered

Where to store secrets and other configuration settings

(0) ShareShare
ReportReport
Posted on by 159

Hello,

 

I am calling a cloud flow from JavaScript. I cannot hard code the cloud flow URL in the JavaScript for obvious reasons.

 

What is the best practice to store secrets and other configuration settings in Power Pages where they can be referenced via JavaScript or Liquid?

 

Thanks in advance!

 

Regards,

Irvin 

  • oliver.rodrigues Profile Picture
    9,319 Most Valuable Professional on at
    Re: Where to store secrets and other configuration settings

    @Haris2 can you create a separate thread? 

  • dax1232 Profile Picture
    36 on at
    Re: Where to store secrets and other configuration settings

    Hi iwaldman,

    We are also considering to use Site settings. But first we ran into a different problem. When I call the flow from Power Pages I get the below error. 

    [NullReferenceException: Object reference not set to an instance of an object.]
     Adxstudio.Xrm.PowerAutomate.PowerAutomateHelper.IsRequestValidated(String flowId, Entity& cloudFlowRecord, Int32& statusCode, PowerAutomateSubErrorCodes& errorCode) in C:\__w\1\s\Framework\Adxstudio.Xrm\PowerAutomate\PowerAutomateHelper.cs:607
     Adxstudio.Xrm.PowerAutomate.Controllers.PowerAutomateController.TriggerCloudFlow(String flowId, String eventData) in C:\__w\1\s\Framework\Adxstudio.Xrm\PowerAutomate\Controllers\PowerAutomateController.cs:40
     lambda_method(Closure , ControllerBase , Object[] ) +190

     

  • iwaldman Profile Picture
    159 on at
    Re: Where to store secrets and other configuration settings

    @Fubar thank you for reply. Is there a generally accepted mechanism where to store configuration data in Portals that is accessible both server and client side? Would Site Settings be an option?

  • Verified answer
    Fubar Profile Picture
    7,964 Super User 2025 Season 1 on at
    Re: Where to store secrets and other configuration settings

    First, you can secure a Http Request cloud flow - there are a number of ways of doing it depending on how secure it needs to be some additional detail here :https://demiliani.com/2020/06/25/securing-your-http-triggered-flow-in-power-automate/

     

    Generally you would keep secrets etc out of Liquid and JavaScript, either call your own Web Service and have them behind it (could even be in Vault) and then your Web Service makes the actual call to the other Web Service and relays the response back to the caller.  Or look at leveraging the Portals support of oAuth implicit grant flow  https://learn.microsoft.com/en-us/power-apps/maker/portals/oauth-implicit-grant-flow

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May 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 Pages

#1
Fubar Profile Picture

Fubar 69 Super User 2025 Season 1

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 49 Most Valuable Professional

#3
Jon Unzueta Profile Picture

Jon Unzueta 43

Featured topics