In this blog post, we’ll explore how to use the SDK for .NET (via Plug-ins or Console Applications) to bypass Power Automate flows with Dataverse connectors. Before we begin, ensure you subscribe to CRM Crate to remain informed about the latest developments in the Power Platform field.

Microsoft Power Automate is a low-code platform designed to automate and optimize business processes across various applications and services. It allows users to create automated workflows, known as “flows,” to synchronize files, get notifications, collect data, and more.
When integrated with Dynamics 365 CRM or Microsoft Dataverse, Power Automate enhances data management and process automation. For instance, it can automate the synchronization of customer data between Dynamics 365 and Dataverse, ensuring that information is up-to-date across systems.
Dataverse connectors in Power Automate provide triggers and actions to manage data within Dataverse. These connectors enable users to create, update, delete, and retrieve data rows, as well as perform actions when data changes occur. This integration facilitates seamless data flow and operational efficiency within an organization.
Why do we need to bypass Power Automate flows?
Power Automate flows can be triggered by various Dataverse events, such as the addition, modification, or deletion of a row, or when a specific action is executed. These triggers cause Dataverse to initiate system jobs within an environment that run the flows. However, when bulk operations are performed by a program or plug-in, it can lead to the generation of a significant number of system jobs. This surge in system jobs can potentially degrade Dataverse’s performance.
Alternatively, there are scenarios where we might need to intentionally bypass or skip the flow execution to meet specific business requirements. This could be necessary to accommodate unique operational needs, ensure compliance with regulatory standards, or optimize performance in certain situations.
Bypass dataverse power automate flows using SDK for .NET
As we know, the Dataverse creates the system jobs to invoke the Power Automate flow. For example, when a new row is added to a table in Dataverse, it automatically creates a system job in the ‘Callback Registration’ table. This system job is then detected by Power Automate flow receptors, which trigger the flow using the Dataverse connector ‘When a row is added’.
We can avoid creating these system jobs in your .Net based program or plug-in by using the optional parameter ‘SuppressCallbackRegistrationExpanderJob’ which will cancel the system job or row creation in the CallbackRegistration table.
The CallbackRegistration table handles flow triggers, and an internal operation called “expander” that is responsible to generate the system jobs. It’s important to note that when this option is used, flow owners will not be notified that their flow logic was bypassed.
Below is the sample data from the ‘Callback Registration’ table as fetched by the Web API.

Use the below .NET based plug-in code for bypassing the Power Automate flow which are having Dataverse connectors.
Scenario & Code Usage
– There is a Power Automate flow which will be invoked when a new row is added in the ”CRM Crate Table’ . We want to bypass this Power Automate flow so that it should not get triggered for new rows created by the plug-in.
– The following code bypasses any Power Automate flow triggered by the addition of a new row in the ‘cc_crmcratetable’ table.

try
{
Entity crmCrateTable = new Entity ("cc_crmcratetable");
crmCrateTable["cc_name"] = "Sample CRM Crate Row";
CreateRequest request = new CreateRequest()
{
Target = crmCrateTable
};
request.Parameters.Add("SuppressCallbackRegistrationExpanderJob", true);
service.Execute(request);
}
catch (Exception ex)
{
throw new InvalidPluginExecutionException($"Trace: An error occurred in CRM Crate Plugin with details - {ex.Message}.");
}