“I stored the environment specific link in an environment variable but PowerApps are now asking for a premium license!”
Solutions are something you should use for all your PowerApps and Power Automate (unless it’s just a single app/flow). They’ll help you stay organised, keep all the parts together, and make it easier to transfer your solutions between environments. That is, unless you get in a situation where you need an environment variable in PowerApps and you don’t have premium licenses. While in Power Automate you can access any environment variable from the flow, as used e.g. in the approval process template, it’s not so in PowerApps. As they’re stored in a Dataverse tables, PowerApps will ask you to get a premium license. That sounds quite strict to read an environment variable, maybe to just build a file download link…
Use Power Automate to get the variable value
As already mentioned, even though PowerApps won’t let you access the variables without licenses, Power Automate will. And since Power Automate flows can be called from PowerApps, you can create a flow that’ll return the value.
Create a flow that’ll be triggered from the PowerApp. The flow must be create from a solution to have access to the environment variables!
Add a ‘Compose’ action where you store the desired environment variable.
Send the value back to the PowerApp.
You might think that the ‘Compose’ step is not needed, I thought that too, but if you remove it the solution won’t work.
Run the flow from the PowerApp
Once you have the flow, you can run it from the PowerApp. Add the flow to the application, use the OnStart property to run it and store the env. variable into a PowerApp variable.
That’s it, you just loaded an environment variable into a PowerApp without the need for a premium PowerApps license.
Summary
Any access to Dataverse table is bound to a PowerApps premium license, including accessing environment variables. But those can be accessed freely from a Power Automate flow, and since PowerApps can trigger Power Automate flows, you can ask a flow for the value.