You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: powerapps-docs/maker/data-platform/create-connection-reference.md
+38-31Lines changed: 38 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
---
2
2
title: Use a connection reference in a solution
3
-
description: Learn how to create a connection reference
3
+
description: Learn how to create a connection reference.
4
4
ms.custom: ""
5
-
ms.date: 02/17/2023
5
+
ms.date: 02/24/2023
6
6
ms.reviewer: angieandrews
7
-
ms.topic: "how-to"
7
+
ms.topic: conceptual
8
8
author: ChrisGarty
9
9
contributors:
10
10
- ChrisGarty
@@ -26,12 +26,14 @@ A [connection](/power-automate/add-manage-connections) is a stored [authenticati
26
26
27
27
A *connection reference* is a solution component that contains a reference to a connection about a specific connector. Both solution-aware canvas apps and operations within a [solution-aware flow](/power-automate/overview-solution-flows) bind to a connection reference instead of directly to a connection. During solution import into a target environment, a connection is provided for all the connection references so any referencing flows can be [turned on](/power-automate/disable-flow#turn-flows-on) automatically after the import completes. To change a specific connection associated with a canvas app or flow, you edit the connection reference component within the solution.
28
28
29
-
You can add a connection reference to a solution in different ways:
30
-
- From the **Solutions** area as described in this article.
29
+
## Add connection references to a solution
31
30
32
-
- During solution import. To learn more, go to [Import solutions](import-update-export-solutions.md).
31
+
Connection references can be added to a solution in different ways:
32
+
- When you're using the solution explorer to create a new connection reference in a solution.
33
33
34
-
- When you build your [canvas apps](../canvas-apps/add-app-solution.md) and [flows](/power-automate/create-flow-solution) in a solution.
34
+
- When you import a solution. To learn more, go to [Import solutions](import-update-export-solutions.md).
35
+
36
+
- Implicitly when you build your [canvas apps](../canvas-apps/add-app-solution.md) and [flows](/power-automate/create-flow-solution) that are defined in a Microsoft Dataverse solution.
35
37
36
38
> [!NOTE]
37
39
>
@@ -40,30 +42,35 @@ You can add a connection reference to a solution in different ways:
40
42
> - Canvas apps and flows added from outside solutions will not automatically be upgraded to use connection references.
41
43
> - Connection references get associated with canvas apps only at the time a data source is added to the app. To upgrade apps you must remove the connection from the app and then add a connection containing an associated connection reference.
42
44
45
+
## Manually add a connection reference to a solution using solution explorer
46
+
43
47
1. Sign in to [Power Apps](https://make.powerapps.com/) or [Power Automate](https://make.powerautomate.com/).
44
48
45
49
1. On the left pane, select **Solutions**.
46
50
47
51
1. Create a new or open an existing solution.
48
52
49
-
1. On the command bar, select **New**, and then in the list of components select**Connection Reference**.
53
+
1. On the command bar, select **New** > **More** >**Connection Reference**.
50
54
51
55
1. On the **New Connection Reference** pane, enter the following information. Required columns are denoted with an asterisk (*).
52
56
-**Display name**: Enter a unique and useful name to help differentiate this connection reference from others.
53
57
-**Add a description**: Enter text that describes the connection.
54
58
-**Connector**: Select an existing connector from the list such as in the screenshot here. You can also select **New** to create a new connection for this connection reference. Once your finished creating a new connection, select **Refresh** to select your connection from the list.
55
59
-**Connection**: Based on the **Connector** you selected, select an existing connection or select **New connection** to create one.
60
+
61
+
1. Select **Create**.
56
62
57
63
:::image type="content" source="media/connection-reference-example.png" alt-text="Screenshot of the New Connection Reference panel.":::
58
64
59
-
1. Select **Create**.
65
+
## Connection reference naming
60
66
61
-
## Limits
67
+
The display name of a connection reference should be unique so different connection references can be differentiated by name alone. By default, a connection reference name includes the target connector, the current solution name for context, and a random suffix to ensure uniqueness. Consider adjusting the connection reference name to something unique and something that explains what it will be used for.
62
68
63
-
Connection references are now saved asynchronously, so unlike during the preview period, there is no longer a limit to how many flows can reference the same connection reference. When connection references are updated, an info banner will be shown that links to a panel containing asynchronous update details.
64
-
There is also no limit to the number of actions in each flow that can be associated with the connection reference.
69
+
## Reuse connections in a solution flow
65
70
66
-
## Updating a flow to use connection references instead of connections
71
+
Flows created outside a solution use connections directly. Flows created in a solution use connection references and the connection reference points at the connection. To reuse a connection within a solution flow, you first need to create a connection reference pointing at that connection.
72
+
73
+
## Update a flow to use connection references instead of connections
67
74
68
75
When a flow isn't in a solution, it uses connections. If that flow is then added into solution, it will continue to use connections initially.
69
76
Flows can be updated to use connections references instead of connections in one of two ways:
@@ -72,47 +79,47 @@ Flows can be updated to use connections references instead of connections in one
72
79
73
80
1. When a solution flow is opened, the flow checker on the flow details page will show a warning to **Use connection references**. The warning message contains an action to **Remove connections so connection references can be added**. Selecting that action will remove connections from the trigger and actions in the flow and allow connection references to be selected and created.
74
81
75
-
## Connection reference usage tips
82
+
## Automatic use of connection references in a solution flow
76
83
77
-
### Reusing connections in a solution flow
84
+
When an action is added to a solution flow, Power Automate will try to reuse existing connection references from the current solution or other solutions before creating a new connection reference. To ensure that the connection reference is inside the same solution as the flow, create or add a connection reference in the same solution and reference that connection reference from the flow.
78
85
79
-
Flows created outside a solution use connections directly. Flows created in a solution use connection references and the connection reference points at the connection. To reuse a connection within a solution flow, you first need to create a connection reference pointing at that connection.
80
-
81
-
### Automatic use of connection references in a solution flow
82
-
83
-
When an action is added to a solution flow, Power Automate will try to reuse existing connection references from the current solution or other solutions before creating a new Connection Reference. To ensure that the connection reference is inside the same solution as the flow, create or add a connection reference in the same solution and reference that connection reference from the flow.
84
-
85
-
### Enable flows containing connections from another user
86
+
## Share connections with another user so flows can be enabled
86
87
87
88
When a flow is enabled, the enabling user needs to own all the connections. This is usually accomplished by having the flow owner create the connections inside all the connection references that the flow uses. If a user other than the owner provides the connections on a flow, then those connections need to be shared with the owner who is enabling (turning on) the flow.
88
89
89
-
#### Manual sharing of connections for flow enablement
90
+
> [!NOTE]
91
+
>
92
+
> Connections can only be explicitly shared with a user representing a service principal.
90
93
91
-
Sharing connections can be accomplished by using the following steps.
94
+
### Manual sharing of connections for flow enablement
95
+
96
+
Sharing connections can be accomplished with the following steps.
92
97
93
98
1. Open the maker portal and select the environment containing the connection.
94
99
95
-
1. Select **Connections** and then select the connection you want to share.
100
+
1. Select **Connections**, and then select the connection you want to share.
96
101
97
102
1. From the menu, select **Share**.
98
103
99
-
1. From the sharing screen, enter the name of the user or service principal that will enable the flow.
104
+
1. From the sharing screen, enter the name of the user (service principal) who will enable the flow.
100
105
101
106
1. For the permissions, select **Can use**.
102
107
103
108
1. To complete the sharing, select **Save**.
104
109
105
-
####Automated sharing of connections for flow enablement
110
+
### Automated sharing of connections for flow enablement
106
111
107
-
To automate sharing of connections, use the [Edit Connection Role Assignment action](/connectors/powerappsformakers/#edit-connection-role-assignment) on the Power Apps for Makers connector. An automated connection sharing example can be found in the **ShareConnectionWithServicePrincipal** flow in the [ALM Accelerator for Power Platform](/power-platform/guidance/coe/setup-almacceleratorpowerplatform-preview).
112
+
To automate sharing of connections, use the [Edit Connection Role Assignment action](/connectors/powerappsformakers/#edit-connection-role-assignment) on the Power Apps for Makers connector. You can find an automated connection sharing example in the **ShareConnectionWithServicePrincipal** flow in the [ALM Accelerator for Power Platform](/power-platform/guidance/coe/setup-almacceleratorpowerplatform-preview).
108
113
109
114
:::image type="content" source="media/share-connections-with-service-principal-flow.png" alt-text="Screenshot of a connection sharing example.":::
110
115
111
-
### Connection reference naming
116
+
## Limits
117
+
118
+
Connection references are now saved asynchronously. Unlike during the preview period, there's no longer a limit to how many flows can reference the same connection reference. When connection references are updated, an info banner that links to a panel containing asynchronous update details appears.
112
119
113
-
The display name of a connection reference should be unique so different connection references can be differentiated by name alone. By default, a connection reference name mentions the target connector, includes the current solution name for context, and includes a random suffix to ensure uniqueness. Consider adjusting the connection reference name to something unique and something that explains what it will be used for.
120
+
There is also no limit to the number of actions in each flow that can be associated with the connection reference.
0 commit comments