how to fix The template validation failed: 'The number of template actions limit exceeded: maximum '1500' and actual '1501'

Goundla, Sai Karthik Goud 0 Reputation points
2026-06-23T06:33:38.25+00:00

Error in ADF: Operation on target For Each Tenant failed: Activity failed because an inner activity failed; Inner activity name: Execute StageTenantTablesInner, Error: ErrorCode=InvalidTemplate, ErrorMessage=The template validation failed: 'The number of template actions limit exceeded: maximum '1500' and actual '1501'

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.


2 answers

Sort by: Most helpful
  1. Manoj Kumar Boyini 18,595 Reputation points Microsoft External Staff Moderator
    2026-06-24T13:57:53.64+00:00

    Hi @Goundla, Sai Karthik Goud

    This is typically caused by a large pipeline design containing a significant number of activities, nested containers (such as ForEach, If Condition, Switch, or Until), or repeated workflow patterns that result in the compiled pipeline exceeding the supported action limit.

    In this case, the failure occurs within Execute StageTenantTablesInner while executing the For Each Tenant activity, indicating that the overall workflow has exceeded the maximum supported number of template actions.

    To resolve the issue, consider refactoring the solution by:

    Splitting the workload into multiple smaller child pipelines.

    Reducing the number of activities executed within the ForEach loop.

    Processing tenants or tables in smaller batches.

    Consolidating repeated logic through parameterization and reusable pipeline patterns.

    These approaches help reduce the total action count and keep the pipeline within the supported limits.

    Please let us know if you need any further assistance.

    References:

    Was this answer helpful?


  2. Senthil kumar 1,465 Reputation points
    2026-06-23T07:00:26.5833333+00:00

    Hi @Goundla, Sai Karthik Goud

    As of now Microsoft allowed max 1500 actions per pipeline so avoid execute in same pipeline. split your actions into 3 to 4 pipelines then execute your actions.

    ex : one foreach execute all actions it will consume limits.

    Thanks.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.