AB-400

Free AB-400 practice questions

10 questions from our AB-400 practice tests, each with the correct answer and a written explanation. Read them with the answers shown, or switch to quiz mode and answer first.

Back to the AB-400 practice exams

Question 1 of 10, Build Microsoft Power Platform solutions. 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.)

  1. AHost a static React site on Azure Static Web Apps and call the connector from the browser
  2. BPublish the app to the environment so sharing and governance are applied through Power Platform Correct answer
  3. CBuild a Power Apps code app and connect it to Dataverse and the connector through its data sources Correct answer
  4. DBuild a model-driven app with an HTML web resource that loads the React bundle in an iframe
  5. EBuild a canvas app and paste the compiled React bundle into an HTML text control

Answer and 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, Build Microsoft Power Platform solutions

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?

  1. AMark the environment variable as a secret type so that its value is never exported with the solution
  2. BRemove the current value from the solution before export and supply it per target at import Correct answer
  3. CClear the default value and set a Required flag so the import fails until someone edits the variable
  4. DConvert the variable to a JSON type so each environment parses its own value

Answer and 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, Extend the user experience

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?

  1. AMove the validation to the OnLoad event so the result is already cached before any save
  2. BCall the API synchronously with XMLHttpRequest in synchronous mode inside the OnSave handler
  3. CEnable async save handlers in the app settings and return the promise from the OnSave handler Correct answer
  4. DAlways cancel the save, call the API, and then call formContext.data.save() when it succeeds

Answer and 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, Extend the user experience

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?

  1. AXrm.Navigation.openErrorDialog and Xrm.Navigation.openAlertDialog
  2. Bcontrol.setNotification(message, uniqueId) and control.clearNotification(uniqueId) Correct answer
  3. CformContext.ui.setFormNotification(message, "ERROR", id) and formContext.ui.refreshRibbon()
  4. Dattribute.setRequiredLevel("required") and attribute.setValue(null)

Answer and 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, Extend the user experience

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?

  1. AXrm.Navigation.openForm({ entityName: "account", entityId: accountId })
  2. BXrm.WebApi.retrieveRecord("account", accountId, "?$select=creditlimit") Correct answer
  3. Cfetch("/api/data/v9.2/accounts") followed by filtering the array in the browser
  4. DXrm.WebApi.retrieveMultipleRecords("account", "?$top=1") without any filter

Answer and 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, Extend Microsoft Power Platform. Choose 2.

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

  1. ARegister a webhook endpoint that issues tokens to the plug-in at run time
  2. BEnable the system-assigned identity of the Dataverse environment in Azure
  3. CCreate a managed identity record in Dataverse and link it to the plug-in assembly Correct answer
  4. DStore the client secret in the step's secure configuration for token refresh
  5. EAdd a federated identity credential to the Entra app or user-assigned managed identity Correct answer

Answer and 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, Extend Microsoft Power Platform

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?

  1. AUse the Copilot Studio client library with an Entra app allowed to invoke the agent Correct answer
  2. BExport the agent's topics as YAML and run them inside the .NET service with a custom interpreter
  3. CScrape the responses from the agent's demo website by automating a headless browser session
  4. DCall the agent's underlying language model deployment directly with an Azure OpenAI API key

Answer and 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, Extend Microsoft Power Platform

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?

  1. ASend CreateMultipleRequest batches from several parallel threads Correct answer
  2. BSend one CreateRequest per row from a single thread in sequence
  3. CWrap all 200,000 rows in a single ExecuteTransactionRequest call
  4. DUse ExecuteMultipleRequest with 10,000 requests per batch

Answer and 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, Extend Microsoft Power Platform

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?

  1. AA Do until loop around the action with no iteration limit
  2. BA fixed interval retry policy on the flow trigger
  3. CConcurrency control set to one on the trigger
  4. DAn exponential interval retry policy on the HTTP action Correct answer

Answer and 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, Develop integrations

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

  1. AThe Set host URL policy template Correct answer
  2. BA connection parameter of type secure string
  3. CA custom code transformation
  4. DThe x-ms-visibility extension

Answer and 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.