AZ-204Chapter 15 of 102Objective 5.1

Azure Logic Apps for Developers

This chapter covers Azure Logic Apps, a serverless integration service for automating workflows and orchestrating business processes. For the AZ-204 exam, this topic falls under Domain 5 (Integrate), Objective 5.1 (Implement integration solutions). Approximately 10-15% of exam questions touch upon Logic Apps, workflow design, connectors, and triggers. You'll need to understand when to use Logic Apps vs. other services like Azure Functions or Power Automate, how to design stateful workflows, and how to handle errors and retries. This chapter provides the depth required to answer both conceptual and scenario-based questions.

25 min read
Intermediate
Updated May 31, 2026

Logic Apps as a Package Delivery Hub

Imagine a large package delivery hub where trucks arrive with packages from various senders (sources like HTTP requests, queues, databases). Each package has a routing label (JSON payload) and a destination. The hub has a conveyor belt system (workflow) that moves packages through a series of automated stations (connectors, actions). Each station is a specialized machine: one reads labels and stamps them with a barcode (Parse JSON), another weighs packages and applies postage (HTTP action), another routes packages to specific outgoing trucks based on zip code (condition), and another scans for restricted items and rejects them (validation). The entire process is orchestrated by a central control panel (Logic Apps Designer) where you can design the conveyor route by dragging and dropping stations. You can also set rules: if a package is fragile, it takes a slower, gentler belt (configured retry policy). If a station jams, the system pauses and retries after 10 seconds (retry interval). The hub keeps a log of every package's journey (run history). You can also trigger the entire system by a schedule (recurrence trigger) or by a phone call (webhook trigger). Just as the hub can be scaled by adding more conveyor lines, Logic Apps can scale by adding more workflow instances. The key is that the hub doesn't execute code; it orchestrates existing services.

How It Actually Works

What is Azure Logic Apps and Why It Exists

Azure Logic Apps is a cloud-based platform for creating and running automated workflows that integrate apps, data, services, and systems. It is part of the Azure Integration Services portfolio alongside API Management, Service Bus, and Event Grid. Logic Apps is designed for developers and IT professionals who need to build complex integrations without writing extensive code. It provides a visual designer and hundreds of prebuilt connectors for common services like Office 365, Salesforce, SQL Server, and Azure Blob Storage. The core value proposition is reducing development time for integrations that would otherwise require custom code, while providing enterprise-grade reliability, scaling, and monitoring.

From an exam perspective, you should know that Logic Apps is a serverless offering — you don't manage infrastructure. It scales automatically and you pay per execution. There are two execution models: Consumption (pay-per-action) and Standard (fixed pricing with dedicated resources). The AZ-204 exam focuses primarily on Consumption plans, but you should be aware of Standard for scenarios requiring VNet integration or custom connectors.

How Logic Apps Works Internally

A Logic App is defined by a workflow — a series of steps (actions) that execute in a defined order. Each workflow is triggered by an event (trigger) and processes data through actions. The workflow definition is stored as JSON in the Azure Resource Manager, following the Workflow Definition Language schema. When a trigger fires, the Logic Apps runtime creates a run instance for each event. The runtime orchestrates execution, handling state, retries, and concurrency.

Here's the step-by-step internal flow:

1.

Trigger Fires: A trigger can be polling (e.g., every 5 minutes check a queue) or push (e.g., HTTP request). For polling triggers, the runtime checks the source at a configurable interval. For push triggers, the source sends a webhook notification.

2.

Run Instance Created: The runtime creates a run ID and initializes the run context, which includes the trigger output (payload) and any system variables.

3.

Action Execution: Actions execute sequentially (default) or in parallel (using 'For each' with concurrency). Each action has inputs, outputs, and a status (Succeeded, Failed, Skipped, TimedOut). The runtime evaluates the action's inputs, calls the connector or HTTP endpoint, and stores the output.

4.

Retry Policy: If an action fails (e.g., HTTP 5xx), the runtime applies the configured retry policy. Default: 4 retries with exponential backoff (starting at 1 second, doubling each time, up to 1 hour). You can customize: fixed interval, exponential, or none.

5.

State Persistence: The runtime persists the entire run history (inputs, outputs, status) for up to 90 days (Consumption) or 28 days (Standard). This allows debugging and reprocessing.

6.

Completion: After all actions succeed (or fail), the run completes and the runtime logs the outcome. If a failure occurs and no error handling is defined, the run fails.

Key Components, Values, and Defaults

- Triggers: - Recurrence: Default interval = 1 hour. Minimum interval = 1 second (but not recommended). Frequency: Second, Minute, Hour, Day, Week, Month. - HTTP Request: Generates a callback URL. Default timeout for waiting for trigger payload = 1 minute (configurable up to 1 hour). - Service Bus Queue: Polling interval default = 30 seconds. Max message count = 10 per poll. - Blob Storage: Polling interval default = 30 seconds. Triggers on new or modified blobs. - Actions: - HTTP Action: Default timeout = 2 minutes (Consumption), 5 minutes (Standard). Max timeout = 2 minutes for Consumption, 5 for Standard (configurable up to 30 minutes with async pattern). - Response Action: Required for synchronous HTTP triggers. Must complete within 120 seconds (Consumption) or 5 minutes (Standard). - Connectors: There are over 450 connectors. Connectors are either Standard (Microsoft-managed, included) or Enterprise (premium, additional cost). Custom connectors can be created for REST APIs. - Limits (Consumption):

Max actions per workflow = 500.

Max run duration = 90 days (after which run is deleted).

Max payload size = 1 MB for actions, 100 MB for large messages (with chunking).

Max concurrent runs = 10 (default) to 50 (configurable).

Limits (Standard):

Max actions per workflow = 500.

Max run duration = 1 year.

Max payload size = 1 MB (actions), 1 GB (with chunking).

Max concurrent runs = 100 (default) to 1000 (configurable).

Configuration and Verification

To create a Logic App in Azure Portal: 1. Navigate to 'Create a resource' > Integration > Logic App. 2. Select Consumption or Standard plan. 3. Provide resource group, name, region. 4. After creation, open Logic Apps Designer to build workflow.

To deploy via ARM template, you define a resource of type Microsoft.Logic/workflows with a definition property containing the workflow JSON.

To verify a Logic App's health:

Monitor > Run History: Shows status, duration, trigger, and action details.

Alerts: Set up metrics-based alerts (e.g., failed runs, throttled actions).

Diagnostic settings: Stream logs to Log Analytics or Storage.

CLI commands (Azure CLI):

# List Logic Apps in a resource group
az logic workflow list --resource-group myRG --output table

# Trigger a Logic App
az logic workflow trigger --resource-group myRG --name myLogicApp --trigger-name manual

# Show run history
az logic workflow run list --resource-group myRG --name myLogicApp

# Show run details
az logic workflow run show --resource-group myRG --name myLogicApp --run-id <runId>

Interaction with Related Technologies

Azure Functions: Logic Apps can call Azure Functions as an action. Use Functions when you need custom code (C#, JavaScript, Python) that is not available via connectors. Functions are stateless; Logic Apps handles state.

Power Automate: Power Automate is for business users with simpler needs (e.g., approvals, notifications). Logic Apps is for developers needing advanced control, custom connectors, and enterprise integration.

Event Grid: Logic Apps can subscribe to Event Grid events via a trigger. This enables event-driven architectures where Logic Apps reacts to Azure resource events.

API Management: Logic Apps can expose APIs via API Management, providing a facade for internal Logic Apps.

Service Bus: Commonly used for decoupling: Logic Apps triggers on messages from Service Bus queues/topics, or sends messages.

Error Handling and Retry

Retry Policy: Configured per action. Options: None, Fixed (retry after fixed interval), Exponential (default). Example: retry 4 times with 10-second interval.

Scope: Use Scope action to group actions and handle errors collectively. You can configure runAfter to execute actions only on failure or timeout.

Terminate Action: Stops the workflow immediately with a specified status (Succeeded, Failed, Cancelled).

Configure Run After: Every action has a 'runAfter' property that defines which statuses trigger it (e.g., run after previous action fails). Default is only on success.

Security

Managed Identity: Logic Apps can use system-assigned or user-assigned managed identities to authenticate to Azure resources without secrets.

Access Keys: HTTP trigger endpoints are secured by Shared Access Signature (SAS) keys. Regenerate keys from the portal.

VNet Integration: Standard Logic Apps can be deployed into a VNet for private access.

IP Restrictions: Restrict incoming HTTP trigger calls to specific IP ranges.

Monitoring and Debugging

Run History: Shows every execution. You can view inputs/outputs of each action. Data is retained for 90 days (Consumption) or 28 days (Standard).

Application Insights: Enable for detailed telemetry: custom events, exceptions, dependencies.

Workflow Visualizer: In portal, you can see the flow of a specific run, highlighting which actions succeeded/failed.

Reprocess Failed Runs: Use 'Resubmit' button to rerun a failed workflow with same inputs.

Performance and Scaling

Concurrency: Default 10 concurrent runs (Consumption). Increase to up to 50. For Standard, default 100, max 1000.

Throttling: Connectors have rate limits (e.g., Office 365: 30 requests per minute). Logic Apps will retry with backoff.

Large Messages: Use chunking for payloads >1 MB. Chunking splits data into 5 MB chunks (default). Supported by Blob Storage, HTTP, and some connectors.

Workflow Definition Language (WDL) Example

{
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "actions": {
            "HTTP": {
                "type": "Http",
                "inputs": {
                    "method": "GET",
                    "uri": "https://api.example.com/data"
                },
                "runAfter": {}
            }
        },
        "triggers": {
            "Recurrence": {
                "type": "Recurrence",
                "recurrence": {
                    "frequency": "Hour",
                    "interval": 1
                }
            }
        }
    }
}

Common Patterns

Request-Response: HTTP trigger with Response action for synchronous pattern.

Asynchronous: HTTP trigger with no Response; caller uses callback URL.

Batch Processing: Recurrence trigger that polls a queue and processes multiple messages.

Fan-out/Fan-in: Use 'For each' with concurrency to process items in parallel, then aggregate results.

Long-Running: Use async pattern with HTTP action (set asyncPattern: true) to handle operations >2 minutes.

Integration with Azure DevOps

CI/CD: Export Logic App as ARM template. Use Azure DevOps pipelines to deploy to different environments.

Parameterization: Use parameters for connection strings, endpoints, etc.

Validate: Use az logic workflow validate command before deployment.

Walk-Through

1

Define Trigger

Start by selecting a trigger that initiates the workflow. Common triggers: Recurrence (scheduled), HTTP Request (callable endpoint), Service Bus (message received), Blob Storage (new blob). For polling triggers, set the polling interval (default 30 seconds for Service Bus). For HTTP Request, note the callback URL and SAS key. The trigger output is a JSON object that subsequent actions can reference. Example: If using HTTP Request, the trigger outputs contain headers, body, and query parameters. The trigger must be the first step; you cannot add actions before it.

2

Add Actions Sequentially

After the trigger, add actions using the designer or JSON editor. Actions can be connectors (e.g., Office 365 Send Email) or built-in (e.g., HTTP, Compose, Parse JSON). Each action has inputs and outputs. Use dynamic content to reference outputs from previous steps. Actions execute in order by default. You can change order by dragging. For parallel execution, use 'For each' or 'Until' loops with concurrency setting. Default concurrency for 'For each' is 20 iterations at a time (Consumption). Each action's timeout is 2 minutes (Consumption) for synchronous calls.

3

Configure Error Handling

By default, if an action fails, the workflow stops. To handle failures, configure 'runAfter' on subsequent actions. For example, set an action to run only when the previous action fails. You can also wrap actions in a 'Scope' to handle errors for a group. Use 'Terminate' action to stop the workflow with a custom status. Retry policies can be set per action: none, fixed interval (e.g., 10 seconds), or exponential backoff (default 4 retries, starting at 1 second). For HTTP actions, retry only on 408, 429, 5xx status codes. You can also add 'Condition' actions to check status codes.

4

Test and Monitor

After building the workflow, trigger a run manually (for HTTP trigger) or wait for the scheduled trigger. Go to 'Run History' to see each run's status, duration, and inputs/outputs per action. Use 'Resubmit' to rerun a failed run with the same inputs. Enable Application Insights for deeper telemetry. Monitor metrics like 'Runs Started', 'Runs Failed', 'Action Latency'. Set up alerts for failed runs. For debugging, use 'Workflow Visualizer' to see the flow and identify which action failed. Check connector-specific errors (e.g., 429 Too Many Requests).

5

Deploy and Manage

Export the Logic App as an ARM template from the portal. Parameterize connection strings, endpoints, and keys. Use Azure DevOps or GitHub Actions to deploy to dev, test, prod. Use 'Logic Apps Preview' for Standard plan to enable VNet integration. Manage access using RBAC: assign Contributor role to developers. Rotate SAS keys regularly. For production, enable diagnostic settings to log to Log Analytics. Use 'Logic Apps B2B' features (X12, EDIFACT) if needed for trading partners. Monitor costs: each action execution is billed (Consumption). Use 'Cost Analysis' to track spending.

What This Looks Like on the Job

Enterprise Scenario 1: Order Processing System

A large e-commerce company uses Logic Apps to automate order processing. When a customer places an order, the e-commerce platform sends an HTTP request to a Logic App with order details. The Logic App first validates the order (check inventory via a SQL Server connector), then creates a record in a Dynamics 365 CRM, sends a confirmation email via Office 365, and finally posts a message to a Service Bus queue for fulfillment. This replaces a custom .NET service that was brittle and hard to maintain. In production, the Logic App processes 10,000 orders per day. Key considerations: The HTTP trigger must respond within 120 seconds (Consumption) to avoid timeout. The SQL Server connector uses a connection string stored in Key Vault. The Logic App is deployed using ARM templates with parameters for environment-specific endpoints. Common issues: The SQL connector throttles during peak hours (max 100 concurrent connections). Solution: Increase concurrency and use retry policies. Another issue: The Office 365 connector has a limit of 30 requests per minute per user; if exceeded, messages queue up and cause delays. Mitigation: Use a dedicated service account and implement a 'For each' loop with concurrency of 10.

Enterprise Scenario 2: Healthcare Data Integration

A healthcare provider integrates patient data from multiple sources using Logic Apps. A Logic App triggers on new blobs in Azure Blob Storage (HL7 messages). It parses the message (using custom JavaScript via Azure Functions), transforms it (using Liquid templates), and writes to a FHIR server. The workflow also sends alerts to a Slack channel if validation fails. Deployed in a Standard plan to enable VNet integration (FHIR server is inside a VNet). Scale: Processes 500 messages per hour. Performance: Blob trigger polling interval set to 10 seconds (minimum). Chunking enabled for large files (>1 MB). Error handling: If FHIR server is unavailable, the Logic App retries 5 times with exponential backoff; after that, the message is moved to a poison queue (Service Bus). Monitoring: Application Insights tracks custom events for each message. Cost: Standard plan costs more per month but avoids per-action charges.

Common Misconfigurations

Not setting 'runAfter' for error handling: If an action fails, the entire workflow fails unless you explicitly configure fallback actions.

Using HTTP trigger without Response action: For synchronous calls, the caller will timeout after 120 seconds if no Response is sent.

Exceeding connector limits: For example, Office 365 has a 30 requests per minute limit; Logic Apps will retry but may cause delays.

Not using managed identities: Storing connection strings in plaintext is a security risk. Use managed identities or Key Vault references.

Ignoring concurrency settings: Default concurrency of 10 may be too low for high-throughput scenarios, causing backlog.

How AZ-204 Actually Tests This

What AZ-204 Tests on Logic Apps

Objective 5.1: Implement integration solutions. Specifically, the exam expects you to:

Design and implement Logic Apps workflows (triggers, actions, conditions, loops).

Choose between Logic Apps and Azure Functions for a given scenario.

Configure connectors, custom connectors, and API connections.

Implement error handling (retry policies, scopes, runAfter).

Secure Logic Apps (managed identities, SAS keys, IP restrictions).

Monitor and debug (run history, Application Insights).

Deploy Logic Apps (ARM templates, CI/CD).

Common Wrong Answers and Why Candidates Choose Them

1.

Choosing Azure Functions instead of Logic Apps for orchestration: Candidates often pick Functions when the scenario involves multiple steps and integrations. But Functions are for code execution; Logic Apps is for orchestration. The exam will test this distinction: if the scenario requires integrating multiple SaaS services with minimal code, choose Logic Apps.

2.

Setting retry policy on trigger instead of action: Candidates may try to configure retries on the trigger level. Triggers do not have retry policies; retry is per action. If a trigger fails (e.g., polling error), the next polling cycle will attempt again.

3.

Using HTTP trigger for long-running operations without async pattern: A common mistake is expecting an HTTP trigger to wait for a response for more than 2 minutes. The exam will present a scenario where a workflow takes 5 minutes; candidates must know to use async pattern or return a 202 Accepted immediately.

4.

Ignoring connector limits: When scaling, candidates forget that connectors have rate limits (e.g., 30 requests per minute for Office 365). The exam may ask how to handle throttling; answer: use retry policies with exponential backoff or reduce concurrency.

Specific Numbers and Terms to Memorize

Default retry count: 4 (exponential backoff, starting at 1 second).

HTTP action timeout (Consumption): 2 minutes.

Maximum run duration (Consumption): 90 days.

Maximum payload size (Consumption): 1 MB (actions), 100 MB (chunking).

Default concurrency: 10 (Consumption), 100 (Standard).

Polling interval default for Service Bus: 30 seconds.

SAS key generation: Every HTTP trigger has two SAS keys (primary and secondary).

Managed identity: Supports both system-assigned and user-assigned.

Workflow Definition Language (WDL) schema version: 2016-06-01.

Edge Cases and Exceptions

What if an action times out? The action fails with status 'TimedOut'. You can configure a retry policy to retry after timeout.

What if the trigger fires multiple times for the same event? For idempotent workflows, ensure actions are idempotent (e.g., use 'Upsert' operations).

Can a Logic App call itself? Yes, but avoid infinite loops. Use 'Condition' to break cycles.

What happens if the Logic App is disabled? Runs are not executed; pending messages in triggers (e.g., Service Bus) remain until the Logic App is enabled.

How to handle poison messages? Use a separate logic app or queue to move failed messages after a max retry count.

How to Eliminate Wrong Answers

If the question asks for 'real-time' or 'low-latency' (<1 sec), Logic Apps may not be suitable due to polling intervals. Consider Event Grid or Azure Functions.

If the question involves custom code (e.g., complex algorithm), choose Azure Functions.

If the question involves human approval or simple automation, choose Power Automate.

If the question requires VNet integration, choose Standard plan (Consumption does not support VNet).

If the question mentions 'stateful' orchestration with checkpointing, Logic Apps is the answer; Functions are stateless.

Key Takeaways

Logic Apps is a serverless integration platform for orchestrating workflows using triggers and actions.

Default retry policy: 4 retries with exponential backoff (1s, 2s, 4s, 8s).

HTTP action timeout (Consumption) is 2 minutes; for longer operations, use async pattern or Azure Functions.

Maximum run duration (Consumption): 90 days; (Standard): 1 year.

Use managed identities to authenticate to Azure resources without secrets.

Concurrency default: 10 (Consumption), 100 (Standard); max configurable: 50 (Consumption), 1000 (Standard).

Polling triggers have default intervals (e.g., Service Bus: 30s); reduce interval for faster response but higher cost.

Error handling: Use 'runAfter' and 'Scope' to manage failures; retry policies are per action.

Deploy via ARM templates; parameterize connections and endpoints.

Monitor with Run History (90 days retention) and Application Insights.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

Azure Logic Apps

Low-code visual designer; good for integration workflows

Stateful orchestration with automatic retry and history

Over 450 prebuilt connectors

Pay-per-action billing (Consumption)

Ideal for long-running workflows (up to 90 days)

Azure Functions

Code-first; supports C#, JavaScript, Python, etc.

Stateless (or Durable Functions for stateful)

No built-in connectors; must write custom code

Pay-per-execution (duration and memory)

Ideal for short-running, compute-intensive tasks

Watch Out for These

Mistake

Logic Apps can only be triggered by HTTP requests.

Correct

Logic Apps supports many triggers: Recurrence (scheduled), Service Bus, Blob Storage, Event Grid, Salesforce, etc. HTTP is just one of many.

Mistake

All connectors are free.

Correct

Standard connectors (e.g., Office 365, SQL Server) are included with Consumption plan. Enterprise connectors (e.g., SAP, IBM MQ) require additional licensing.

Mistake

Logic Apps can run indefinitely.

Correct

Consumption plan has a max run duration of 90 days. After that, the run is deleted. Standard plan allows up to 1 year.

Mistake

You cannot use custom code in Logic Apps.

Correct

You can use Azure Functions or inline JavaScript (via JavaScript action, preview) to execute custom code. Also, you can use Liquid templates for transformations.

Mistake

Logic Apps automatically scales to unlimited concurrency.

Correct

Concurrency is limited: Consumption max 50 concurrent runs, Standard max 1000. You must configure it properly.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

What is the difference between Consumption and Standard Logic Apps?

Consumption plan is serverless, pay-per-action, with a max run duration of 90 days and max concurrency of 50. It cannot be deployed into a VNet. Standard plan runs on dedicated App Service plan, supports VNet integration, has higher limits (1 year run duration, 1000 concurrency), and includes built-in connectors. For AZ-204, focus on Consumption, but know Standard for VNet scenarios.

How do I handle a long-running operation in Logic Apps?

Use the async pattern: Set the HTTP action's 'asyncPattern' to true. The action will return a 202 Accepted with a location header. Logic Apps will poll the location until the operation completes. Alternatively, offload the long-running task to an Azure Function and wait for it via a webhook.

Can I use Logic Apps with on-premises data?

Yes, use the on-premises data gateway. Install the gateway on a local server, then create a connection in Logic Apps. Supported connectors: SQL Server, File System, Oracle, DB2, etc.

How do I secure an HTTP trigger in Logic Apps?

The HTTP trigger generates a callback URL with a SAS key (primary and secondary). You can regenerate keys from the portal. Additionally, restrict IP addresses in the Logic App's access control settings. Use Azure AD authentication by enabling 'Azure AD' in the trigger settings.

What is the maximum payload size for a Logic App action?

For Consumption, the max payload size is 1 MB for actions. For larger payloads, enable chunking (supports up to 100 MB). For Standard, max is 1 MB (actions) and up to 1 GB with chunking. Chunking is supported for HTTP, Blob Storage, and some other connectors.

How do I debug a failed Logic App run?

Go to Run History, select the failed run, and review each action's inputs and outputs. Use 'Resubmit' to rerun with same inputs. Enable Application Insights for deeper telemetry. Check connector-specific errors (e.g., 429 throttling). Use 'Workflow Visualizer' to see the flow.

Can I call Logic Apps from other Azure services?

Yes, Logic Apps can be triggered by Event Grid, Service Bus, Azure Functions, or via HTTP. You can also call Logic Apps from Azure Data Factory or Azure DevOps.

Terms Worth Knowing

Ready to put this to the test?

You've just covered Azure Logic Apps for Developers — now see how well it sticks with free AZ-204 practice questions. Full explanations included, no account needed.

Done with this chapter?