Connecting a Canvas App to an Azure Function via Custom Connector
You are creating a canvas app to retrieve user sign in information from Microsoft Azure Active Directory (Azure AD) when someone searches for information about an end user. You create an Azure Function to retrieve the required information by using JSON. You need to ensure that the application functions correctly. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
Community Insight
The test is whether you know the two-step custom-connector workflow — publish an API definition for the Azure Function, then register a custom connector from that definition — with the trap being to reach for Power Automate or Azure Service Bus instead of a direct connector.
When a canvas app must call an Azure Function that returns Azure AD sign-in data as JSON, the function's HTTP endpoint has to be described with an API definition (OpenAPI/Swagger) and then wrapped in a Power Platform custom connector. This question establishes that the correct pair of actions is creating the API definition (E) and then creating a custom connector from it (B).
The most common wrong pick is option A, creating a Power Automate flow to import the data; a flow can proxy a call but it is not required and adds an unnecessary layer, while options C and D (app designer in the admin center, Azure Service Bus) address neither authentication nor schema for the app-to-function call.
Community Discussion (10 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option E is required first: the Azure Function exposes an HTTP endpoint, and Power Platform needs a machine-readable API definition (OpenAPI/Swagger, often auto-generated from the function'sfunction.json and OpenAPI extension) that describes the operations, parameters, and JSON response schema. Option B then consumes that definition — the custom connector registers the Azure Function API as a callable connector with policy templates and (optionally) Azure AD or API-key authentication, so the canvas app can call it directly with ConnectorName.OperationName. Together, E and B form Microsoft's documented custom connector workflow: define the API, then create the connector from that definition.Why the Other Options Are Wrong
Option A (a Power Automate flow to import data) is an indirect workaround: a cloud flow calling the function and returning its output can work, but it is not the mechanism that makes the canvas app "function correctly" and it is not needed for a live search on an end user. Option C (the app designer in the Power Platform admin center) is irrelevant — the admin center does not configure data connectivity for a canvas app; adding a connector happens in the app designer inside Power Apps Studio. Option D (Azure Service Bus) is an asynchronous messaging service for decoupled, queue-based integration and cannot let a canvas app synchronously query sign-in information for a search box. Note also that only a custom connector secures and standardizes the JSON contract between the app and the function.Community Comment Notes
The comments converge on BE with strong agreement: as itmaxuser explained, "The custom connector enables the app to call your Azure Function securely and handle the communication between the canvas app and the Azure Function." A_A_C made the pragmatic observation that "Lets say, we all agree with E. So the only logical answer left that go with E, is B", and alevalli9 acknowledged that "Creating a Power Automate can be a possible solution but not the best practice I think," which is exactly why A is a distractor rather than part of the required pair.Official Reference
Exam Strategy
When a question pairs an Azure API/hosting piece with a Power Platform piece, look for the two-step "describe the API, then register the connector" pattern — an OpenAPI/Swagger definition feeding a custom connector. Eliminate options that add an unnecessary middle tier (flows, Service Bus) for what is meant to be a direct app-to-function call.
Frequently Asked Questions
Why is creating an API definition for the Azure Function necessary before the custom connector?
The API definition (OpenAPI/Swagger) documents the function's operations, parameters, and JSON response schema. The Power Platform import wizard uses it to generate the connector's actions and parameter bindings automatically.
Why not just use a Power Automate flow to call the Azure Function from the canvas app?
A flow can act as a proxy, but it adds latency, licensing, and maintenance overhead for what is a synchronous lookup. A custom connector calling the function directly is the intended, best-practice pattern.
Related Analysis
Practice All PL-400 Questions
Access 85 questions with complete answers and detailed explanations.
View Full PL-400 Practice Test →