Power Automate Connect to Other Environments

Advertisements
Advertisements

Previously, the connectivity options for the Microsoft Dataverse connector were limited. The Dynamic 365 (deprecated) and Microsoft Dataverse (legacy) connectors were the only available methods to link to Dataverse in different environments from cloud flows. However, with the inclusion of the Environment parameter, the Microsoft Dataverse connector’s triggers and actions now offer enhanced flexibility. Users can now seamlessly connect to either the current flow’s environment or select another environment as needed.

The following diagram shows a Power Automate cloud flow triggered by a change in a Contoso Support environment. This flow interacts with other Contoso Services and Contoso Field Service environments, performing actions such as listing rows, adding a row, and executing an action in the example Contoso Corporation’s Microsoft Entra tenant.

https://learn.microsoft.com/en-us/power-automate/dataverse/connect-to-other-environments

How to connect other environments from flows?

  • Sign in to Power Automate.
  • Create a new cloud flow or open an existing flow.
  • In the flow designer, select the plus sign (+) to add a new action.
  • Search for dataverse, and then select See more on the Microsoft Dataverse connector to see all available actions.
https://learn.microsoft.com/en-us/power-automate/dataverse/connect-to-other-environments#add-actions-that-connect-to-other-environments
  • Add one of actions that ends in selected environment (preview), such as List rows from selected environment (preview).
  • Use the Environment parameter in the action card to choose the environment to connect to. The connection you use for the action must have permissions to perform the operation in the other environment.
https://learn.microsoft.com/en-us/power-automate/dataverse/connect-to-other-environments#add-actions-that-connect-to-other-environments
  • To connect to Dataverse in the same environment as the flow, select (Current) in the Environment parameter.

Actions and triggers that can connect to other environments

The following Microsoft Dataverse connector actions support connecting to other environments.

  • Add a new row
  • Update a row
  • Delete a row
  • List rows
  • Get a row by ID
  • Perform a bound action
  • Perform an unbound action
  • Relate rows
  • Unrelate rows
  • Upload a file or image
  • Download a file or image

The actions to search rows and perform a changeset request don’t have preview actions with the Environment parameter yet.

The following triggers support connecting to other environments but haven’t been released yet:

The following triggers won’t support the Environment parameter since they’re only applicable to the same environment the flow is located in.

Add actions that connect to other environments dynamically

To dynamically set the Environment parameter, choose Enter custom value and provide the root URL of a Power Platform environment in the format https://<yourenvironmentid>.crm.dynamics.com/. You can use a string, expression, environment variable, or dynamic content as the URL.

To obtain the root URL of an environment, you can access the details page of the environment from the Power Platform admin center, or utilize the output of the List user environments action in the Power Automate Management connector.

For actions like Add a row that rely on the specific table schema from a particular environment, the schema is not automatically retrieved when specifying the environment dynamically. The request needs to be manually created using the LogicalCollectionName of the table and the request body in JSON format, similar to a Dataverse Web API request. For example, accounts and { “name”: “Contoso Marketing” }.

Limitations

  • Using instant flows with the Dataverse connection set to Provided by run-only user isn’t supported yet.
  • The triggers When a row is added, modified or deleted and When an action is performed don’t support the Environment parameter yet.
  • The actions to Search rows and Perform a changeset request don’t have preview actions with the Environment parameter yet.
Advertisements
Advertisements
Advertisements

Leave a comment

Create a website or blog at WordPress.com