Skip to main content
Community site session details

Community site session details

Session Id : FCXqyDv3XSvQUC7tBWnx+K
Power Pages - Customize & Extend
Answered

Where to store secrets and other configuration settings

Like (0) ShareShare
ReportReport
Posted on 21 Dec 2022 14:54:08 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,342 Most Valuable Professional on 27 Oct 2023 at 15:44:39
    Re: Where to store secrets and other configuration settings

    @Haris2 can you create a separate thread? 

  • dax1232 Profile Picture
    36 on 11 Oct 2023 at 08:55:49
    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 22 Dec 2022 at 13:07:24
    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
    8,047 Super User 2025 Season 2 on 21 Dec 2022 at 22:28:28
    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

Announcing our 2025 Season 2 Super Users!

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

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!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#2
Lucas001 Profile Picture

Lucas001 48 Super User 2025 Season 2

#3
KevinGador Profile Picture

KevinGador 44 Super User 2025 Season 2

Featured topics

Loading started