# Free AB-400 practice questions

> 10 free AB-400 practice questions with the correct answer and an explanation.

Page: https://devopscodelab.com/exams/microsoft-pl-400/free-practice-questions/
Practice exams: https://devopscodelab.com/exams/microsoft-pl-400/

### Question 1 of 10 (choose 2)

Developers must keep using Visual Studio Code with React and TypeScript to build a full-screen business app that uses Dataverse data and a Power Platform connector, and the app must be governed by environment policies such as data policies and conditional access. Which user experience option fits best? (Choose two.)

- A. Host a static React site on Azure Static Web Apps and call the connector from the browser
- B. Publish the app to the environment so sharing and governance are applied through Power Platform
- C. Build a Power Apps code app and connect it to Dataverse and the connector through its data sources
- D. Build a model-driven app with an HTML web resource that loads the React bundle in an iframe
- E. Build a canvas app and paste the compiled React bundle into an HTML text control

**Answer:** B, C

**Explanation:** Power Apps code apps let developers build with code-first frameworks such as React in their own IDE, connect to Dataverse and connectors, and publish into an environment where Power Platform sharing and governance apply. Pasting a bundle into a canvas control is unsupported, and a standalone static site would not be governed by Power Platform policies. A web resource inside a model-driven app is not a full-screen standalone app and is not the recommended host for a full React application.

### Question 2 of 10

A developer exports a managed solution that includes an environment variable with a current value of the development API URL. After import into test, the variable uses the development URL. How should the developer prevent this in future deployments?

- A. Mark the environment variable as a secret type so that its value is never exported with the solution
- B. Remove the current value from the solution before export and supply it per target at import
- C. Clear the default value and set a Required flag so the import fails until someone edits the variable
- D. Convert the variable to a JSON type so each environment parses its own value

**Answer:** B

**Explanation:** The current value travels with the solution when it is included, so it should be removed from the solution before export and set in each target through the import experience or a deployment settings file used by pipelines. Secret environment variables reference Azure Key Vault and are not a fix for a plain URL. Changing the data type does not stop the value from being exported, and deliberately failing imports adds manual work rather than supplying the correct value.

### Question 3 of 10

An OnSave handler must call an external validation API that returns a promise, and the save must wait for the result before deciding to cancel. What should the developer do?

- A. Move the validation to the OnLoad event so the result is already cached before any save
- B. Call the API synchronously with XMLHttpRequest in synchronous mode inside the OnSave handler
- C. Enable async save handlers in the app settings and return the promise from the OnSave handler
- D. Always cancel the save, call the API, and then call formContext.data.save() when it succeeds

**Answer:** C

**Explanation:** Model-driven apps support asynchronous OnSave handlers when enabled in app settings, and returning a promise makes the platform wait for it, with a timeout. Synchronous XMLHttpRequest is deprecated and blocks the browser. Always cancelling and then saving again works but re-triggers OnSave and is more fragile, and validating on load cannot reflect changes made before saving.

### Question 4 of 10

A script must show an error under the Email column when the format is invalid and remove it once the user fixes it. Which pair of methods should be used?

- A. Xrm.Navigation.openErrorDialog and Xrm.Navigation.openAlertDialog
- B. control.setNotification(message, uniqueId) and control.clearNotification(uniqueId)
- C. formContext.ui.setFormNotification(message, "ERROR", id) and formContext.ui.refreshRibbon()
- D. attribute.setRequiredLevel("required") and attribute.setValue(null)

**Answer:** B

**Explanation:** setNotification on a control shows a message next to the column and blocks save, and clearNotification with the same ID removes it. A form notification is shown at the top of the form, and refreshRibbon updates commands. Dialogs interrupt the user and do not attach to the column, and requirement level changes do not display custom validation messages.

### Question 5 of 10

A form script must retrieve the parent account's credit limit when the contact form loads, using only the column it needs. Which call should the developer use?

- A. Xrm.Navigation.openForm({ entityName: "account", entityId: accountId })
- B. Xrm.WebApi.retrieveRecord("account", accountId, "?$select=creditlimit")
- C. fetch("/api/data/v9.2/accounts") followed by filtering the array in the browser
- D. Xrm.WebApi.retrieveMultipleRecords("account", "?$top=1") without any filter

**Answer:** B

**Explanation:** retrieveRecord gets a single row by ID and the $select option limits the payload to the needed column. Retrieving the first account without a filter returns the wrong record, and openForm navigates to a form instead of reading data. Retrieving all accounts and filtering in the browser wastes bandwidth and can hit paging limits.

### Question 6 of 10 (choose 2)

Which steps are part of configuring Power Platform managed identity for a plug-in assembly? (Choose two.)

- A. Register a webhook endpoint that issues tokens to the plug-in at run time
- B. Enable the system-assigned identity of the Dataverse environment in Azure
- C. Create a managed identity record in Dataverse and link it to the plug-in assembly
- D. Store the client secret in the step's secure configuration for token refresh
- E. Add a federated identity credential to the Entra app or user-assigned managed identity

**Answer:** C, E

**Explanation:** Managed identity for plug-ins uses a Dataverse managed identity record linked to the assembly, plus a federated credential on the Entra application or user-assigned managed identity that trusts the signed assembly. No client secret is stored, Dataverse environments do not expose a system-assigned identity in the Azure portal for this purpose, and webhooks do not issue tokens.

### Question 7 of 10

A .NET service must send user questions to a published Copilot Studio agent and receive its responses programmatically, using the signed-in user's identity. Which approach should be used?

- A. Use the Copilot Studio client library with an Entra app allowed to invoke the agent
- B. Export the agent's topics as YAML and run them inside the .NET service with a custom interpreter
- C. Scrape the responses from the agent's demo website by automating a headless browser session
- D. Call the agent's underlying language model deployment directly with an Azure OpenAI API key

**Answer:** A

**Explanation:** The Copilot Studio client library connects code to a published agent and uses an Entra app registration with delegated permission to invoke Copilot Studio agents on behalf of the user. Calling the model directly bypasses the agent's topics, knowledge, and tools, scraping a demo site is unsupported, and topics cannot be executed outside Copilot Studio.

### Question 8 of 10

An import job must create 200,000 rows in a standard table as fast as possible using the SDK, while plug-ins registered on create still run. Which approach provides the BEST throughput?

- A. Send CreateMultipleRequest batches from several parallel threads
- B. Send one CreateRequest per row from a single thread in sequence
- C. Wrap all 200,000 rows in a single ExecuteTransactionRequest call
- D. Use ExecuteMultipleRequest with 10,000 requests per batch

**Answer:** A

**Explanation:** CreateMultiple is a bulk operation message that processes many rows per request with lower overhead, and parallel threads within service protection limits increase throughput. Single-row sequential creates are slow, a transaction with that many rows is impractical and will time out, and ExecuteMultiple is limited to 1,000 requests per batch.

### Question 9 of 10

An HTTP action in a flow calls an API that occasionally returns 503 errors for a few seconds. The developer wants the action to retry up to four times with growing waits. Which configuration should be used?

- A. A Do until loop around the action with no iteration limit
- B. A fixed interval retry policy on the flow trigger
- C. Concurrency control set to one on the trigger
- D. An exponential interval retry policy on the HTTP action

**Answer:** D

**Explanation:** An exponential retry policy on the action retries transient failures with increasing intervals, which is the default behavior for many actions and can be customized. Trigger retry policies do not affect the HTTP action, an unlimited loop risks running forever, and concurrency control limits parallel runs rather than retrying failures.

### Question 10 of 10

A custom connector must route all requests to a different host in each environment without editing the OpenAPI definition. Which feature should be used?

- A. The Set host URL policy template
- B. A connection parameter of type secure string
- C. A custom code transformation
- D. The x-ms-visibility extension

**Answer:** A

**Explanation:** The Set host URL policy template changes the host at run time, and it can reference connection parameters or environment-specific values. x-ms-visibility controls whether parameters are shown, custom code transforms request and response payloads, and a secure string parameter stores secrets rather than routing requests.

Ready for a timed run? Take the free 15-question AB-400 mini exam: https://devopscodelab.com/app/exams/microsoft-pl-400/mini/

DevOpsCode Lab is not affiliated with Microsoft. AB-400 and related names are trademarks of their owners. We write every question ourselves; these are not real exam questions.
