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
@Haris2 can you create a separate thread?
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
@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?
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
Fubar
69
Super User 2025 Season 1
oliver.rodrigues
49
Most Valuable Professional
Jon Unzueta
43