Showing results for 
Search instead for 
Did you mean: 
Advocate III
Advocate III

Concurrency in an Apply To Each that calls external web service

I'd like help understanding concurrency in a Power Automate flow's Apply to Each operation when it makes an external HTTP call and processes its response, please.

I have a PowerApps-triggered flow which

  • takes an incoming list of records with unique ID 'MyID' and puts them in an array variable, 'JSONIn'
  • initializes an output array variable, 'JSONOut'
  • performs an Apply to Each operation on the records in JSONin. This operation..
  • calls an external web service (using SOAP) with the record. The web service does stuff and creates its own record, with unique ID 'TheirID'. It returns a response including its TheirID (but nothing else to uniquely identify back to the the calling record and MyID)
  • Apply to Each then takes this response and creates a record that includes TheirID and MyID, derived from items()?['MyID'], and
  • appends this record to JSONOut
  • after Apply To Each the main flow then Responds with JSONOut

I therefore end up with a table that allows me to link MyID and TheirID. Any variables within the Apply To Each loop are Composed, and its only external references are to JSONOut and JSONIn.


I have the Apply To Each operation set with Concurrency Control on and Degree of Parallelism 1. This all works fine, but could do with speeding up. Can I safely increase the parallelism to improve speed, or does this risk getting a wrong TheirID for a MyID?


I'm a bit hazy about the Apply To Each operation, and whether each iteration is safely scoped such that the response from the external web service is always aligned with that iteration's item()?['MyID'], no matter how long it takes. The order in which records are created in JSONOut doesn't matter.


Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,541)