When you need to insert, update, or delete a large number of records in Dataverse, synchronous plug-ins can get in the way. Asynchronous plug-ins and Power Automate flows are triggered independently (out of process) but can be overwhelming for the system and can be throttled down. Did you know you can bypass either? Did you know you can do it in Power Automate?
Dataverse operations in Power Automate are usually done using the connector. But as you probably already know, you can send direct requests to the Web API using either HTTP with Entra ID or HTTP with Entra ID (preauthorized). For example, this is how a contact can be created:
The magic sauce is in the headers that you can set under Advanced parameters. The following are available bypass options and bypass options in preview:
Header | Value | Comments |
---|---|---|
MSCRM.BypassCustomPluginExecution | true | Bypass synchronous plug-ins. |
MSCRM.SuppressCallbackRegistrationExpanderJob | true | Bypass all Power Automate flows triggered by the operation. No special privilege is required 😳. |
MSCRM.BypassBusinessLogicExecution | CustomSync CustomAsync CustomSync, CustomAsync | Bypass either synchronous plug-ins, asynchronous plug-ins, or both. Note: flows are not bypassed using this option. |
MSCRM.BypassBusinessLogicExecutionStepIds | List of steps guids | Bypass specified registered plug-in steps. |
Additional privilege prvBypassCustomPlugins
is required for all settings except SuppressCallbackRegistrationExpanderJob
. As one would expect, core operations and operations published by Microsoft are not bypassed.
Tested and confirmed:
- It does work nicely, thank you very much.
- It does bypass the plug-ins and/or flows, as advertised.
- Bypassing synchronous plug-ins can potentially make your operation faster.
- Bypassing asynchronous logic is not usually required or recommended. There are better strategies.
- There is a lot more to it, and I strongly recommend putting on a Real Developer™️ hat and reading the documentation here and here.