Currently rolling out to is the ability to configure Power Pages site settings as environment variables. Why is this such a big deal? In Power Pages configuration, much of the Power Pages website configuration is stored in metadata records called site settings. In many cases, these site settings are unique to specific environments, for example, external identity providers. The provider configuration needs to be unique for each environment. This means that once a website is deployed, a website maker/developer will need to go in and update the unique provider settings directly on the downstream environment, and would also create an unmanaged solution layer which goes against solution management best practices.
Companion YouTube video of this post coming soon!
Overall Power Pages website configuration is actually stored in Microsoft Dataverse records. It was only with the new enhanced data model feature that the website metadata could be transported in regular Power Platform solutions. The problem is that for things like site settings, these would need to be reconfigured on downstream environments, creating an unmanaged layer.
Using the older standard data model, the feature of deployment profiles allowed for unique items such as site settings to be configured once per environment.
In regular Power Platform configuration (Power Apps, Power Automate, etc), environment variables are used to store unique values for each environment.
Now we are able to store the site settings as environment variables!
In this example, I have configured the Entra External ID for my development website but I would also need to configure this for my testing site.
These values are stored as Site settings and can be viewed using the Power Pages management app. In the case I identified four site setting values that are unique to an environment and will need to configure these as site settings.
By default, these are stored as simple text field settings. There is now a new field called Source that will determine if the site setting is stored via the text field value (Table) or an environment variable.
Before we can convert our identity provider site settings configuration to environment variables, we will need to configure environment variables to hold the site setting values.
We need to copy each of the values that we want to store as environment variables. In a solution, create a new environment variable.
Give the environment variable a name (close aligned to the site setting name to keep track), choose data type of Text and enter in the site setting value as the default value, and select Save.
Repeat for each of the unique settings.
Once the environment variables are configured, go to the Power Pages management app, select the site setting record and switch the source from table to environment variable.
Then select the corresponding environment variable.
Repeat the process until you have set the specific site settings to environment variables.
I added the environment variables and the website to a solution that we will use to transport to the target environment.
I configured Power Platform pipelines to deploy the solution.
The pipeline process will allow you to enter in the new environment variable values, in this case, these are new values for a Entra External ID provider configure specifically for the target environment.
Select next to deploy the solution to the target environment.
Reminder: If this is the first time you are deploying a website to a new environment, you will need to activate the website the first time.
Once the site is activated, you should see the settings reflect the target environment, based on the environment variables you set during the deployment!
In terms of Power Pages ALM, this is a game changer and will remove the need to use deployment profiles. What I would like to see is the ability to somehow manage content snippets as well, but that may be difficult due to character limitations.
Nick Doelman is a Microsoft MVP, podcaster, trainer, public speaker, and competitive Powerlifter. Follow Nick on X at @readyxrm or LinkedIN, and now; Bluesky. Listen or watch the the Power Platform Boost podcast with Nick and co-host Ulrikke Akerbæk every second week for news and updates from the Power Platform community.
Original Post https://readyxrm.blog/2025/02/28/power-pages-site-settings-as-environment-variables/