We all know that when using proper ALM in Power Automate SPN's are the way to go. Sadly not all connections use them, and the ones that do have challenges.
One of my most recent challenges was updating a secret for a Dataverse connection in a prod environment.
Unfortunately you can't simply update the connections secret, you have to create a new connection. Additionally you cant create the connection in the connections section in the studio, you can only set a spn when you create a connection inside the flow builder.

Above shows no spn option when creating connection inside connection section
So you have to:
- Create new flow
- Create new connection
- Update connection reference with new connection
Luckily there is a better way. I found a api that can update the secret in the actual connection.
To update the connection I use a flow using the HTTP with 'Microsoft Entra ID (preauthorized)' connector and the following setup:
Now all we do is use the 'Get Connections as Admin' of the api to get all the connections, filter by the spn (I use the spns name in the connection Display name, so I can filter them easier). And then update the secret:
The demo flow is manual and has environment, connection Type (e.g Dataverse = shared_commondataserviceforapps), environment, and new secret, but can easily be setup as part of a app or automated from secure Dataverse table.
Call out here, the connection editing the secret must have access to the connection, so it must be shared with or the owner of the connection is used.
A copy of the solution can also be found in GitHub https://github.com/wyattdave/Power-Platform/tree/main/Power%20Automate%20Artifacts