Introduction
Efficient deployment processes are crucial for any software development lifecycle. Automating deployment tasks not only saves time but also minimizes the chances of human error. One powerful tool in this regard is the deployment settings file, which allows developers to automate the population of environment variables and connection references during the deployment pipeline import solution task. In this article, we will explore the significance of a deployment settings file and provide a step-by-step guide on how to generate and utilize it.
Use Cases
- Setting Up Environments: With a deployment settings file, developers can easily handle settings that are specific to different environments without having to do it manually. This is really useful when you're deploying solutions in places like development, testing, and production.
- Maintain Consistency: Making sure that every deployment is done in the same way is crucial for a dependable application. The deployment settings file helps in keeping a standard way of setting things up, making it less likely to have problems during deployment.
Step by Step process to implement this automation
Step 1. Generate the Deployment Settings file
Pre-requisites
- PAC CLI should be installed in the local system. It can be downloaded from this link: Microsoft Power Platform CLI.
Open Windows Command Prompt and run the below command to generate the deployment settings file.
C:\> pac solution create-settings --solution-zip <file path of solution zip file exported from source environment> --settings-file <deployment settings file name with .json extension>
After successful execution, the deployment settings file will be generated in the current location.
Sample run output

Below are the file contents generated from the exported solution, which contains two connection references and an environment variable.
{
"EnvironmentVariables": [
{
"SchemaName": "sak_EnvVar1",
"Value": "",
"Name": {
"Default": "Env Var1",
"ByLcid": {
"1033": "Env Var1"
}
}
}
],
"ConnectionReferences": [
{
"LogicalName": "sak_MicrosoftDataverse",
"ConnectionId": "",
"ConnectorId": "/providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps"
},
{
"LogicalName": "sak_Sharepoint",
"ConnectionId": "",
"ConnectorId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline"
}
]
}
Step 2. Upload the environment-specific deployment settings file to Azure Repos.
First, we need to update the complete deployment settings file by providing value in environment variables and ConnectionId in Connection References.
In our solution, the environment variable value = Environment Name(DEV, UAT), and it can be retrieved from the current value of the environment variable as below.

ConnectionId can be retrieved by navigating to Connections in the maker portal, as shown below.







Join the conversation! Your thoughts help the community grow.