Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Connection References and Env Vars Preview observations

We are testing the preview feature of the powerapps tools for deploying environment variables and connection references and here's some observations so far...


Environment variables:
1. Really easy to add to the deployment settings file
2. Deploying them from devops is seamless (no more turning flows off and then back on to get the new values after a change)


The only question/issue? that we've run into is that Azure DevOps doesn't import an environment variable value if there is already one in the target environment when that existing one has been Deactivated. (statecode != 0)

Connection References:
I understand that this feature is still in preview. That said, this one has been a bit more problematic for us.

The pre-release documentation is good. Our dev shop has packaged up 19 flows and put them into our main solution. We've worked through the 16 flows per connection reference as stated in the documentation. The issues that we're having are related to the solution import and flows not being activated after the solution upgrade is complete.


In one of our environments, 12 of the 19 flows are "On" after the import. The 7 that are "Off" don't have any obvious similarity like the same owners, using the same connection references etc.


In another environment, none of the flows get turned on after the deployment.


All of the flows that are off will turn on with no errors if done manually. That would indicate to me that there's nothing major amiss with the way we have the connection references defined in the settings file and that the deployment is satisfied with the connections and connection reference config.


It looks like the flows that do get turned on have a modified datetime that would indicate they get turned on during the solution import. (As opposed to the upgrade step) Not sure if this means anything really. Just an observation.


I have triple checked that the target environment's connection ids are correctly put into the deployment settings file for their respective connection references.


Has anyone else put the connection references preview ALM tools through there paces yet and has this all working smoothly?


cc: @kartikka ; @Captjoemcd 

Regular Visitor

Hi Jeff, 


For environment variables I would not use the config file the way outlines in the deployment settings file. I solved this a long tome ago by adding some information to the .gitignore file. 

# Added to block values in source

Then create the value (not the default value) in the target environment ONCE and it will stick around until deleted or changed. 


Reconnecting connection references is another beast. I have NOT been able to get any of it to work as outlined in the preview documentation. I have tried the same process plus variations in many different demo tenants with out a positive result yet. I have emails and post out, but seems pretty quiet. 


My nest step is to remove Azure devOps from the equation and perform a manual script run doing the same thing with a global and power platform admin user rather than an SPN. When I get some solid results I will follow up. 


Good luck! 

Frequent Visitor

Thanks for the info @cjlund383 ,


We have been able to get the connection references to work reasonably well now. I think the secret sauce was to set the owner of the connection references to the SPN being used to deploy the solution from Azure DevOps. (The SPN used to connect to the env.)


So, for us anyway, things seem to be working properly. We still have to have a helper flow to turn on our Cloud flows as they still get imported into the environment and end up "Off". I would assume the team is still working to resolve that. May be more of a flow thing than an ALM tools concern.

Helpful resources

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (1,341)