Blog

Power Automate Connection Reference Failures

Power Automate Connection Reference Failures

What is Power Automate?

Power Automate is a cloud-based service that allows you to create automated workflows between different applications and services, such as the Dataverse, SharePoint, Teams and many other Microsoft and non-Microsoft applications!

What are Connection References?

In Power Automate, connection references play a crucial role in managing authentication credentials for connectors. Credentials are managed with 2 components:

  1. Connections: These are stored authentication credentials for connectors. For instance, OAuth credentials for the SharePoint connector. They allow users to connect their accounts and use prebuilt actions and triggers to build apps and Flows.
  2. Connection References: These are solution components that reference a specific connection for a connector. Both solution-aware canvas apps and operations within solution-aware Flows bind to connection references instead of directly to connections. During solution import, connections must be created for all connection references, allowing referencing flows to be automatically turned on after import.

Reasons Connection References may fail

  1. A Connection has not been created for the environment. Each Connection Reference needs a Connection, which is separate from the Power Platform solution. Connections can be created for users and service principals, but cannot be shared with other users.
  2. The Connection link has been removed from the Connection Reference. If you ever see the red exclamation mark next to a Connection Reference inside of a Power Automate Flow, check that the Connection is linked!
  3. The underlying Connection needs to be fixed. There are many reasons for this such as a password expired, or the token has expired.

Methods to prevent Connection References from failing

It can be frustrating to set up a Power Automate Flow, test it, deploy it and have it running successfully for months only to find out that it stops working. And unfortunately, this may not be noticeable for days or weeks! Developers can set up an automated process to check for Flow failures and your power admin users can set up methods to prevent common Connection Reference failures. Some of these include:

  • Use a Service Principal for Connections that allow them, such as the Dataverse and some custom connectors. The benefits of using a Service principal are outlined here.
  • If you ever see your Connection fail due to an error such as: “The refresh token has expired due to inactivity”, you should set up an automated process to refresh the token every X days/months, depending on the requirements. For pre-built Connections, you may opt to create a Flow that uses each active Connection once for the purposes of a token refresh. That way, even if your Flows are inactive for periods of time, the Connections will remain valid and ready to be used once new activity occurs.
  • Keep Connection References removed from solutions that you deploy regularly to Production. Connections and Connection References should be created once and deployed once to the target organizations. Removing them from your deployment solutions can prevent unintended changes to them.

Contact Beringer Today!

We love to implement Microsoft Dynamics 365 and Power Platform solutions here at Beringer.  We’ve been working with Microsoft Dynamics since its inception, and we’re always finding innovative ways to implement the latest tools and help automate business processes.

Beringer Technology Group, a Microsoft Solutions Partner for Business Applications, specializing in Microsoft Dynamics 365 and CRM for Distribution also provides expert Managed IT ServicesBackup and Disaster RecoveryCloud Based Computing, Email Security Implementation and TrainingUnified Communication Solutions, and Cybersecurity Risk Assessment.