A few days ago, I had someone message asking me to update the secret key the App Registrations for our Power Automate Flows. At first glance I thought – “No problem” – I’ll go to the Flow, and update the connections.
But even though I could add an app registration for a flow from the designer, I could not update it. Worst, as I looked through all the DataVerse connections I had in my flows, I realized that it could become a supremely daunting task to update each one.
I’m not going to dive into the differences between Connection and Connection References. There is an incredibly brilliant post on this here that does an incredible job going through it.
However, in my case, I needed to update the App Registration with a new secret key and to do this, I needed to get access to that not very accessible Connection Reference. Here is what I had to do to update this.
Before getting started on updating the App Registration you will need to have your Azure Tenant Id, your App Registration Id and the Secret Key that you are changing to.
Use PAC to Get Your Environments
If you have VSCode, download the Power Platform Tools extension, this will install PAC onto your system. Once done, open up a new Terminal an start by getting a list of your environments.
Use the command “pac env list”

(Apologies for all the red)
Find the Connections for that Environment
Now using the “Environment ID” from the previous command use the “pac connection list –environment “ENTER ENVIRONMENT ID” command to get back all the connections that are in use in that environment.
You should get something back akin to this with the name of your connections that are currently in use

Updating the Connection Reference
Now you have everything you need for the final change. Using the same window you are going to use the “pac connection update” command.
pac connection update --environment "Environment ID" --tenant-id "Azure Tenant Id" --connection-id "pac-dv-5c46db8a-c1a3-4cda-ba2e-08bd200900bb" --application-id "App Id Registration" --client-secret "New Secret"
When completed, you will have updated the primary connection reference for your Flows so you do not need to go and check each one.