cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
larschrjensen
Frequent Visitor

Release solution to new environment with devops

I am interested in information about or experiences with deploying PowerApps solutions to new environments within the same tenant. 

In my solution I have a canvas-app and several flows between the app and sharepoint. I have used connection references to all connections (sharepoint, mail, etc.). On the devops side I have a build pipeline from my development environment, very much in line with Microsoft's recommendations for ALM. In addition, I have a release pipeline to publish the solution in another environment, e.g. a test environment. I can publish the release but when I access the solution in the new environment all flows have been turned off and all connections to sharepoint have been severed. When I inspect the flows it throws an error that it was unable to locate the connection Id. What strikes me as odd here is that the connection references that are visible in the new solution cannot be selected. However, what I can do is to add a new connection (from each flow), whereafter I can turn the flow back on and activate each of them in the canvas app. 

What I am asking for here, is any documentation, guide, tutorial, help,  to make this release a little more automatic, so I won't have to re-add connections for every single action from each of my flows. 

2 ACCEPTED SOLUTIONS

Accepted Solutions
EricRegnier
Super User II
Super User II

Hi @larschrjensen,

Unfortunately Power Automate flows automatically get deactivated after a solution import, that's the default behavior. You can have a PowerShell task in your pipeline that enables them after the import using "Enable-Flow" cmdlet: https://docs.microsoft.com/power-platform/admin/powerapps-powershell 

For the connections, all you need to do is set them up once in the target environments and include the connection references in the solutions, then the apps and flows should automatically reference the connections without re-configuration: https://docs.microsoft.com/powerapps/maker/data-platform/create-connection-reference 

Hope this helps!

View solution in original post

larschrjensen
Frequent Visitor

I think I have finally found a working solution. I'll document my steps here for other ALM hopefuls. 
When pushing to the target environment for the first time I need to click on each of the connection references, click on solutions layers, (see pa_1)  use the breadcrumb path to go one step back (see pa_2) and from here I can assign the correct connection. Subsequent deployments now work without any hassle. 

View solution in original post

3 REPLIES 3
EricRegnier
Super User II
Super User II

Hi @larschrjensen,

Unfortunately Power Automate flows automatically get deactivated after a solution import, that's the default behavior. You can have a PowerShell task in your pipeline that enables them after the import using "Enable-Flow" cmdlet: https://docs.microsoft.com/power-platform/admin/powerapps-powershell 

For the connections, all you need to do is set them up once in the target environments and include the connection references in the solutions, then the apps and flows should automatically reference the connections without re-configuration: https://docs.microsoft.com/powerapps/maker/data-platform/create-connection-reference 

Hope this helps!

View solution in original post

Hi @EricRegnier 

 

I will take a look into powershell task, I was not aware this was 'intended behavior', but thank for the reference.

 

As for the connection references, this is exactly what I have been doing. I've added the connections (e.g. to mail or sharepoint) in the target environment, added connection references in the source environment and made sure that the flows are using exactly those references. Then when I deploy to the target environment and turn on a flow it throws me the following error:

 

Failed to activate component(s). Flow client error returned with status code "BadRequest" and details "{"error":{"code":"XrmConnectionReferenceMissingConnection","message":"Connection-id' missing logical name for \"new_Mail\" to connection reference."}}".


Then when opening a flow it marks the connection as invalid. I can then add a new connection reference, but not choose the one already available in the solution. 

 

Any pointers to what I am doing wrong will be highly appreciated

 

 

larschrjensen
Frequent Visitor

I think I have finally found a working solution. I'll document my steps here for other ALM hopefuls. 
When pushing to the target environment for the first time I need to click on each of the connection references, click on solutions layers, (see pa_1)  use the breadcrumb path to go one step back (see pa_2) and from here I can assign the correct connection. Subsequent deployments now work without any hassle. 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (71,212)