Sergei Moukhnitski is one of the developers on our team and he solved this really annoying problem we have had for a while. Sergei doesnt blog but let me share this info incase others have the same problem. Sergei’s info is below:

https://www.linkedin.com/in/sergei-moukhnitski-59b41113/

The problem we had was that we have this one Logic App solution which uses the sharepoint connector. Everytime we de-deploy the solution the ARM template which contains the logic app and api connection we then have to re-authenticate the sharepoint connection.

We have a number of other solutions which all work fine and on a deployment do not need the connector to be re-authenticated.

The cause of the problem that Sergei identified was the version used on the connection resource.

This is the arm template snippet where you can see the version which needs to be reauthenticated.

This is the snippet which does not need reauthenticating

If you notice the api version property is different and that was setting up the connector differently. Note the parameter settings element name is also different on the newer version.

Hope this saves someone else pulling out some hair as its been annoying us for ages

Pints to Sergei on this one!