πŸ”’ Guided

Pre-launch preview. Authorised access only.

Incorrect code

Guided by A Guide to Cloud
Explore AB-900 AI-901
Guided PL-400 Domain 5
Domain 5 β€” Module 5 of 9 56%
19 of 26 overall

PL-400 Study Guide

Domain 1: Create a Technical Design

  • Solution Architecture: What Goes Where Free
  • Security by Design: Auth, Roles & DLP Free
  • Designing UX Components: Canvas, PCF & Client Scripts Free
  • Designing Platform Extensions: Connectors, Plug-ins & APIs Free
  • Integration & Automation Blueprints Free

Domain 2: Build Power Platform Solutions

  • Environment Setup & Security Troubleshooting
  • Solutions & Layers: ALM Foundations
  • CI/CD Pipelines for Power Platform

Domain 3: Implement Power Apps Improvements

  • Advanced Power Fx & Canvas Components
  • Troubleshoot & Optimise Apps

Domain 4: Extend the User Experience

  • Client Scripting: Form Events & the Client API
  • Commands, Buttons & Custom Page Navigation
  • PCF Components: Build & Lifecycle
  • PCF Components: Package, Deploy & Advanced Features

Domain 5: Extend the Platform

  • The Plug-in Pipeline: How Dataverse Processes Events Free
  • Writing Plug-ins: Business Logic, Service & Registration
  • Custom APIs & Business Events
  • Custom Connectors: OpenAPI & Authentication
  • Custom Connectors: Azure, Policies & Code
  • Dataverse APIs: Web API & Organisation Service
  • Azure Functions for Power Platform
  • Cloud Flows: Dataverse Triggers & Expressions
  • Cloud Flows: Security, Errors & Child Flows

Domain 6: Develop Integrations

  • Publishing Dataverse Events
  • Service Endpoints: Webhooks, Service Bus & Event Hub
  • Data Sync: Change Tracking, Alternate Keys & Upsert

PL-400 Study Guide

Domain 1: Create a Technical Design

  • Solution Architecture: What Goes Where Free
  • Security by Design: Auth, Roles & DLP Free
  • Designing UX Components: Canvas, PCF & Client Scripts Free
  • Designing Platform Extensions: Connectors, Plug-ins & APIs Free
  • Integration & Automation Blueprints Free

Domain 2: Build Power Platform Solutions

  • Environment Setup & Security Troubleshooting
  • Solutions & Layers: ALM Foundations
  • CI/CD Pipelines for Power Platform

Domain 3: Implement Power Apps Improvements

  • Advanced Power Fx & Canvas Components
  • Troubleshoot & Optimise Apps

Domain 4: Extend the User Experience

  • Client Scripting: Form Events & the Client API
  • Commands, Buttons & Custom Page Navigation
  • PCF Components: Build & Lifecycle
  • PCF Components: Package, Deploy & Advanced Features

Domain 5: Extend the Platform

  • The Plug-in Pipeline: How Dataverse Processes Events Free
  • Writing Plug-ins: Business Logic, Service & Registration
  • Custom APIs & Business Events
  • Custom Connectors: OpenAPI & Authentication
  • Custom Connectors: Azure, Policies & Code
  • Dataverse APIs: Web API & Organisation Service
  • Azure Functions for Power Platform
  • Cloud Flows: Dataverse Triggers & Expressions
  • Cloud Flows: Security, Errors & Child Flows

Domain 6: Develop Integrations

  • Publishing Dataverse Events
  • Service Endpoints: Webhooks, Service Bus & Event Hub
  • Data Sync: Change Tracking, Alternate Keys & Upsert
Domain 5: Extend the Platform Premium ⏱ ~12 min read

Custom Connectors: Azure, Policies & Code

Take custom connectors further. Build connectors backed by Azure Functions, use policy templates to transform data at runtime, and write custom code to reshape API responses.

Advanced connector patterns

β˜• Simple explanation

Think of these advanced patterns like a food processing plant.

A basic connector is like a delivery truck β€” it picks up raw ingredients (API data) and delivers them to the kitchen (Power Platform). But sometimes you need processing: sorting apples by size (policy templates), peeling potatoes before delivery (code transforms), or cooking a specific recipe (Azure Function).

This module covers three β€œprocessing” techniques: Azure Functions as connector backends, policy templates that modify data in transit, and custom code that transforms API responses before they reach your app or flow.

Advanced custom connector patterns include: creating connectors backed by Azure Functions (for custom compute, aggregation, or complex transformations), using policy templates to modify connector behavior at runtime (set headers, convert data types, route requests), and writing C# code within the connector definition to transform request/response payloads.

These patterns are essential when the external API’s format does not match what Power Platform expects, when you need server-side processing between the API and Power Platform, or when building connectors for Azure services with complex authentication patterns.

Azure Function as connector backend

When an external API does not exist or needs a processing layer, build an Azure Function and wrap it in a custom connector.

The pattern

Canvas App / Flow β†’ Custom Connector β†’ Azure Function β†’ External System(s)

When to use this pattern

  • The logic is too complex for a direct API call (aggregation, multi-step processing)
  • You need to call multiple external APIs and combine results
  • The external API format does not match what Power Platform needs
  • You need server-side caching or rate limiting

Creating the connector from an Azure Function

  1. Build the Azure Function with HTTP trigger
  2. Export the OpenAPI definition from the Function App (Azure portal β†’ API Definition)
  3. Import the definition into Power Platform as a custom connector
  4. Configure authentication (Function key or OAuth via Entra ID β€” managed identity for connectors is in preview)
πŸ’‘ Scenario: Marcus builds a price comparison connector

Marcus needs a connector that compares shipping prices across three carriers. No single API provides this β€” each carrier has its own API.

Solution: An Azure Function that:

  1. Accepts package details (weight, dimensions, destination)
  2. Calls all three carrier APIs in parallel
  3. Compares prices and returns a sorted list
  4. Caches results for 5 minutes to reduce API calls

The custom connector wraps this Function with a single action: CompareShippingPrices. Makers see one clean action instead of three separate API calls.

Policy templates

Policy templates modify connector behavior at runtime WITHOUT changing the OpenAPI definition or writing code. They intercept requests and responses.

PolicyWhat It DoesExample Use
SetHeaderAdd or modify HTTP headersAdd X-API-Version: 2.0 to every request
SetQueryParameterAdd query parametersAppend format=json to all requests
SetPropertyModify request/response body propertiesRename a field from cust_name to customerName
ConvertTransform data typesConvert Unix timestamp to ISO 8601 date
RouteRequestRedirect requests to a different URLRoute test traffic to a staging API

Policy template example

To add a required header to every API call:

<set-header name="X-API-Version" existsAction="override">
    <value>2.0</value>
</set-header>

To convert a response field:

<set-body>
@{
    var response = context.Response.Body.As<JObject>();
    response["createdDate"] = DateTimeOffset.FromUnixTimeSeconds(
        (long)response["created_timestamp"]
    ).ToString("o");
    return response.ToString();
}
</set-body>

Custom code transforms

For complex transformations that policy templates cannot handle, you can write C# code directly in the connector definition.

When to use code vs policies

ScenarioUse Policy TemplatesUse Custom Code
Add a headerYesOverkill
Rename a fieldYes (SetProperty)Overkill
Convert date formatYes (Convert)Overkill
Flatten nested JSONNoYes
Filter array elementsNoYes
Aggregate multiple valuesNoYes
Complex conditional logicNoYes

Code transform example

public class Script : ScriptBase
{
    public override async Task<HttpResponseMessage> ExecuteAsync()
    {
        // Read the original response
        var response = await this.Context.SendAsync(
            this.Context.Request, this.CancellationToken);
        
        if (response.IsSuccessStatusCode)
        {
            var content = await response.Content.ReadAsStringAsync();
            var data = JObject.Parse(content);
            
            // Transform: flatten nested address object
            var address = data["address"] as JObject;
            if (address != null)
            {
                data["street"] = address["line1"];
                data["city"] = address["city"];
                data["postcode"] = address["postalCode"];
                data.Remove("address");
            }
            
            response.Content = CreateJsonContent(data.ToString());
        }
        
        return response;
    }
}

Extending the OpenAPI definition

After importing an initial definition, you often need to extend it:

  • Add x-ms-summary β€” friendly display names for actions and parameters
  • Add x-ms-visibility β€” control which fields show by default (important, advanced, internal)
  • Add x-ms-trigger β€” mark an operation as a Power Automate trigger
  • Add x-ms-dynamic-values β€” populate dropdowns dynamically from another API call
  • Modify response schemas β€” match the actual API response (imports are not always perfect)
Question

When should you use an Azure Function as a connector backend?

Click or press Enter to reveal answer

Answer

When you need server-side processing that the API alone cannot provide: aggregating data from multiple APIs, complex transformations, caching, rate limiting, or when the target API does not exist yet and you need to build the logic yourself.

Click to flip back

Question

What are policy templates in custom connectors?

Click or press Enter to reveal answer

Answer

Policy templates modify connector behavior at runtime without changing the OpenAPI definition or writing code. Examples: SetHeader (add headers), SetQueryParameter (add params), SetProperty (rename fields), Convert (transform data types), RouteRequest (redirect to different URL).

Click to flip back

Question

What is x-ms-visibility in an OpenAPI definition?

Click or press Enter to reveal answer

Answer

An extension that controls how parameters and properties appear in the Power Platform designer. Values: 'important' (always shown), 'advanced' (shown under 'Show advanced options'), 'internal' (hidden from the designer, used for system values). Improves the maker experience.

Click to flip back

Knowledge Check

An external API returns dates as Unix timestamps (e.g., 1714521600). Power Automate users need to see these as human-readable dates. What is the simplest approach?

🎬 Video coming soon

Next up: Dataverse APIs: Web API & Organisation Service β€” performing operations with OData, bulk requests, and OAuth authentication.

← Previous

Custom Connectors: OpenAPI & Authentication

Next β†’

Dataverse APIs: Web API & Organisation Service

Guided

I learn, I simplify, I share.

A Guide to Cloud YouTube Feedback

© 2026 Sutheesh. All rights reserved.

Guided is an independent study resource and is not affiliated with, endorsed by, or officially connected to Microsoft. Microsoft, Azure, and related trademarks are property of Microsoft Corporation. Always verify information against Microsoft Learn.