When you create a Power App and any associated Flows in the Power Apps for Teams Studio, it is created in the Teams environment for the associated team. All the data connections, tables, apps and flows are added to a solution in that environment by default. This can make modifying data connections a bit challenging so let’s look at how to do that.
Since all the pieces are contained in the solution you can’t add a new data connection in the Flow itself. Trying to add a new data connection here will result in a browser window that never connects.
To add a new data connection, open the Power Automate Web client like you would when working with a regular flow. Once in the client change your environment to the environment for your team. In the upper right corner of your browser click on Environments to access the list of available environments and select the environment that matches the team your flow is in.
After selecting your environment, on the left navigation pane go to Data -> Connections. Here you will see all the connections used in your environment.
Click ‘New connection’ at the top to create your new connection. Select the data connection you need from the list. Click ‘create’ and provide the account information that should be used for the new connection.
Once you have created the new connection successfully, there are 2 placed you can go to update the connection reference.
In the Power Automate client’s left navigation pane, click on ‘Solutions’ and open the Default solution.
Once in the Solution Navigator, select ‘Connection References’. Click the connection you want to update to open the edit pane and select the newly created connection in the connection dropdown. Click Save.
You can also update your connection reference in the Power Apps for Teams Studio.
In the build tab of the studio select your team and then choose ‘See All’ at the bottom of the list of items that are displayed.
In the studio left navigation, select Other -> Connection References. Click on the connection reference to open the edit pane and select the newly created connection in the connection dropdown. Click Save.
Once you have updated your connection reference, make sure to verify that all the actions in the flow using that connection are updated to the new connection reference.