Power Platform: Connection Reference

In this article, I want to share some basic concepts of Connection References in Power Platform. This might help you to quickly adapt when creating flows or applications.

First of all, connection references contain information about connections that are present inside a solution. In simple words, we can say that connection references are a pointer that points to connections present inside a solution.

Connection references are useful when flows/apps are transferred between environments as users won’t need to set all individual connections present in them. So, all connections inside a solution are just to be set once for one environment.

Flows/Apps require connectivity to various components for which they use connectors, and when we change the environment, we need to rebind every connector. But when using connection reference, we just need to rebind the references and all flows using a similar connection will be bound.

That’s why Connection references are needed when we are moving flows/apps across environments, to update connections in flows, automate the deployment pipelines for security, and proper application management. Connection reference helps by setting all connections inside flows/apps by setting it once. Another benefit of connection reference is that we can swap out connections easily from all flows just by doing it once.

When a flow/App is made inside a solution, all connections are converted to connection references. Before a connection reference is made, it will check if the same connection is already present in the solution and if not present then only a new connection reference is made. So, the whole solution would contain a single connection reference pointing to a particular connection. 

There are two ways to create a connection reference.

First way –

1. Open Power Automate or power Apps, on the left side menu -> select Solutions.

2. On the Solution page, you can choose an existing solution or create a new solution.

3. On the top bar choose New -> More -> Connection Reference.

No alt text provided for this image

4. On the New Connection Reference pan, you need to enter information like Display name (what name you would like to see in solutions), description (optional but for information), Connector (which connector to use for e.g. Microsoft teams, share point), Connection (existing or create new).

No alt text provided for this image

5. Choose Create and you will see your reference created in your solution.

6. Inside flow/app check for the Connection reference.

No alt text provided for this image

Second way –

1. Open Power Automate or power Apps, on the left side menu -> select Solutions.

2. On the Solution page, you can choose an existing solution or create a new solution.

3. Make your Flow inside this solution and it will automatically create connection references of connectors used inside the flow or point to existing connection reference if the same connection is already present.

No alt text provided for this image

Users in the same environment with proper permissions available can view the components inside the solution (including connection references). While users of the same environment with no permissions can only view the solution but not the components present inside. Permission here refers to power platform admin or high privilege to the user.

Users having permissions will see other users’ connections as shown in the image.

No alt text provided for this image

When editing a connection reference, we can see a connection reference present inside a solution but cannot see what exact connection is used by other users. Users cannot share the same connections. We cannot make connection reference with other’s connections, but if we have multiple users logged in, we can use any connection we want from those connections.

For deploying connection references in different environments, the user must export the solution and then import it in another environment.

While exporting, you must give a version number and choose between managed or unmanaged. It will create a zip file that could be later imported.

No alt text provided for this image

When a solution is imported, it will open a connection page in which the user who is importing will need to set the connections for the connection references present in the solution. By setting this, all the flows/apps inside the solution will be able to refer to these selected connections.

No alt text provided for this image

In managed solutions, various components are not editable such as we cannot edit details about connection reference in it. While in unmanaged solution editing is possible. Flows can be edited in both managed and unmanaged solutions.

No alt text provided for this image

Managed Solution cannot be imported in the same environment that contains the unmanaged solution. To test the managed solution, you need to import that in other environments.

If there are multiple instances of the same type of connector present in flows/apps, the user will be given an option to choose a connection for all those instances as shown in the below image (two different connections to SharePoint). It is up to the user to choose the same or different connections for all those instances. Users can create new connections inside the environment in which they have permissions. Users cannot see connections of another user except the one shown in the flows. To find the connections created by you(user), go to Dataverse and check connections. 

No alt text provided for this image

Hope this will help when working with connections in Power Platform!

Written by Elizabeth Akinfiieva, Senior Developer

Comments are closed.