web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

CLI Deployment with env

(0) ShareShare
ReportReport
Posted on by 9

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:

 
 
 
pac deploy
 

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 with pac deploy to 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!

I have the same question (0)
  • developerAJ Profile Picture
    4,344 on at
    CLI Deployment with env
    we can add the attached file in repo so that when solution is deployed it will refer the values from the json instead of the values it got from dev
     
    this is applicable for both env variables and connection references

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 766 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 235

Last 30 days Overall leaderboard