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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / CLI Deployment with env
Power Apps
Unanswered

CLI Deployment with env

(0) ShareShare
ReportReport
Posted on by 24

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!

Categories:
I have the same question (0)
  • developerAJ Profile Picture
    4,763 on at
    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
  • developerAJ Profile Picture
    4,763 on at
    please let me know if that answered your query

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 428

#2
Haque Profile Picture

Haque 338

#3
timl Profile Picture

timl 333 Super User 2026 Season 1

Last 30 days Overall leaderboard