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 Pages / Where to store secrets...
Power Pages
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 

Categories:
I have the same question (0)
  • Verified answer
    Fubar Profile Picture
    8,526 Super User 2026 Season 1 on at

    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

  • iwaldman Profile Picture
    159 on at

    @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?

  • dax1232 Profile Picture
    36 on at

    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

     

  • oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    @Haris2 can you create a separate thread? 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Valantis Profile Picture

Valantis 37

#2
sannavajjala87 Profile Picture

sannavajjala87 36 Super User 2026 Season 1

#3
Fubar Profile Picture

Fubar 23 Super User 2026 Season 1

Last 30 days Overall leaderboard