Hi everyone,
I’m currently working on automating solution deployments in Power Platform using the Power Platform CLI, and I’m running into a limitation related to environment variables and connection references.
I deploy my managed solution using the command:
The deployment process itself runs smoothly — all components (apps, flows, tables, etc.) are imported correctly, and the environment variables as well as connection references are properly recognized and bound to the existing objects in the target environment.
However, the issue is that although they are bound correctly, I cannot find any way to set or update their values directly through the CLI. After the deployment, the variables still hold whatever default values were exported from the source environment, and any connection references that require different connections in the target environment have to be adjusted manually.
My main goal is to have a fully automated deployment through the Power Platform CLI — ideally something that can be integrated into a CI/CD pipeline without requiring manual steps after deployment.
So my questions are:
-
Is there any way to set or override environment variable values during or after deployment via the CLI?
-
Can connection references be updated or re-bound using CLI commands, rather than through the Power Apps / Power Automate UI?
-
Are there existing commands like
pac envvar,pac connection, or other approaches that can be combined withpac deployto achieve this? -
If not, is there any documented best practice or roadmap for enabling full configuration management through the CLI (similar to how Power Platform pipelines handle it)?
I’ve looked through the available CLI documentation, but there’s very little information on how to handle these configuration elements programmatically. Since environment variables and connection references are essential for deploying across multiple environments (dev, test, prod), it would be great to know if anyone has already solved this problem — maybe through scripting or using an additional command sequence after the deployment.
Any guidance, examples, or insights from your own deployment process would be really appreciated.
Thanks a lot!


Report
All responses (
Answers (