manually-removing-concurrency-control-from-a-power-automate-flow

Manually removing Concurrency Control Limits from a Power Automate Flow

Adam MaurerTechnical Leave a Comment

A key feature in Flows is having the ability to limit how many flows for this particular flow can run at the same time. The Degree of Parallelism can be set between 1 and 100, which can prevent API overloads, increase performance, and enhance data integrity. It’s especially useful to stop duplicate triggers. For example, if your trigger is a Webhook which might get triggered multiple times, and there are no unique identifiers to weed out the duplicate Webhook, you can enable Concurrency Control Limits paired with writing information from the Webhook to an Excel file or database and create a condition to check if that data already exists before proceeding with the Flow.
Image

However, once this feature is turned on, there is no turning back…until now!

You may have already experienced this challenge and even tried to delete the trigger and replace it. Or, you may have thought to export the Flow and reimport it. Unfortunately, these methods are met with the dreaded error Flow save failed with code 'CannotDisableTriggerConcurrency' and message 'The trigger… has concurrency runtime configuration specified. Trigger concurrency runtime configuration cannot be removed once specified.'

You may also have been the victim of a Flow no longer triggering after setting Concurrency Control to On and you just want to get it back to where it will trigger. This has known to happen when a Flow is marked as potentially containing a circular loop, where you receive the following notification upon saving the Flow: Your flow was saved, but with a warning: Your flow may have a circular loop. Actions in this flow may result in an infinite trigger loop. Please ensure you add appropriate conditional checks to prevent this flow from triggering itself.

You can always rebuild your Flow from scratch, and the Copy Action functionality has assisted in speeding up this process. However, if your Flow is large, complex, or you invested way too much time in getting it up and running, redoing it can be a discouraging endeavor.

Luckily, there is a solution with minimal effort, where you can export the Flow as a .zip file, manually update the definition.json file and import it as a new Flow.

Exporting the Flow

A rather straightforward process, exporting a flow is performed at the details page of the Flow itself. Select Export then Package (.zip).

Image
Give the package a name then select Export.
Image
Open the .zip file that is downloaded to your machine and Extract all the contents to a location of your choice.
Image

Editing the Flow


From the extracted contents, navigate to Microsoft.Flow -> flows -> the unique identifier of the flow folder -> then open definition.json.

ImageImageImageImage
Using your program of choice to modify the definition.json file, you can perform a Search (Ctrl + F) for the term “conditions”, then remove the following snippet from the code:
,
"conditions": [],
"runtimeConfiguration": { "concurrency": { "runs": 1 } }

Save the definition.json file, overwriting the extracted definition.json file. Verify that the changes took effect. If not, you most likely tried to save over the definition.json file in the .zip file as opposed to the file that was extracted from the .zip file.

Now navigate back to the main contents of the extracted .zip, highlight both the folder and the file, right click, then select Compress to ZIP file. Give the newly created .zip file a name of your choice.

ImageImage

Importing the Flow

You are now ready to import the fixed Flow sans Concurrency Control Limits back into Power Automate.

Navigate to My flows -> select the Import dropdown -> then select Import Package (Legacy).

Image
Select Upload -> Select the new .zip file you just created -> then select Open.
Image
Walkthrough each of the required steps of the Import to ensure all connections are established. You need to address all exclamation marks and turn them into X’s as shown below.
Image

Once all actions have been resolved, the grayed out Import button will become active for you to finalize the Import.

After successful import, Congratulations! You can now visit the Settings of the Trigger to confirm that the Concurrency Control Limit has been removed and you are ready to run your Flow.

Adam

Adam Maurer

COO at Connecting Software

Author:

I am the Chief Operating Officer for Connecting Software, managing the day-to-day operations throughout our various locations. I am passionate about continuous improvement and increasing efficiency. If you want to join our amazing team either in Slovakia or Madeira, please reach out.

 adam@connecting-software.com

Leave a Reply

Your email address will not be published. Required fields are marked *

For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.