# Perform operations by using platform APIs — Practice reading

Exam: AB-400 — Power Platform Developer Associate
Knowledge domain: Extend Microsoft Power Platform (35–40%)
HTML: https://learningpathx.com/learning-path/AB-400/learn/528

This public learning practice includes correct answers and existing explanations. Reading does not save progress or create a test.

## Question 1

Type: single\_choice
Knowledge point: Perform operations by using the Dataverse Web API

A developer must retrieve one existing Inspection row and include its related Reviewer contact in the same response. The environment's Web API root is `https://contoso.crm.dynamics.com/api/data/v9.2`. The Inspection row ID is `40000000-0000-0000-0000-000000000001`.

The environment metadata contains:

```text
Inspection LogicalName: crb_inspection
Inspection EntitySetName: crb_inspectionrecords
Reviewer lookup property: _crb_reviewer_value
Reviewer single-valued navigation property: crb_Reviewer
Contact EntitySetName: contacts
```

Which GET URL should the developer use?

### Options

**A**

Send the GET request to `https://contoso.crm.dynamics.com/api/data/v9.2/crb_inspection(40000000-0000-0000-0000-000000000001)?$expand=crb_Reviewer`.

**B**

Send the GET request to `https://contoso.crm.dynamics.com/api/data/v9.2/crb_inspectionrecords(40000000-0000-0000-0000-000000000001)?$expand=crb_Reviewer`.

**C**

Send the GET request to `https://contoso.crm.dynamics.com/api/data/v9.2/crb_inspectionrecords(40000000-0000-0000-0000-000000000001)?$expand=_crb_reviewer_value`.

**D**

Send the GET request to `https://contoso.crm.dynamics.com/api/data/v9.2/crb_inspectionrecords(40000000-0000-0000-0000-000000000001)?$expand=contacts`.

Correct answer: B

### Explanation

The request must address the Inspection entity set, select the specified row by GUID, and expand the Reviewer relationship. Use crb\_inspectionrecords as the resource and crb\_Reviewer as the $expand value. The lookup property contains the reference value; it does not replace the navigation property used to retrieve the related record. Microsoft documents using EntitySetName for the URL resource and navigation properties for expansions. See [request URL composition](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/compose-http-requests-handle-errors) and the [navigation-property expansion example](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/create-entity-web-api).

## Question 2

Type: single\_choice
Knowledge point: Perform operations by using the Dataverse Web API

A developer's HTTP response helper must record the created account's GUID without making another API call. It must support both of these successful create configurations. The relevant request and response details are shown below.

Default create, without a Prefer header:

```text
POST /api/data/v9.2/accounts

204 No Content
OData-EntityId: https://contoso.crm.dynamics.com/api/data/v9.2/accounts(50000000-0000-0000-0000-000000000001)
Body: empty
```

Create with a representation requested:

```text
POST /api/data/v9.2/accounts?$select=accountid,name
Prefer: return=representation

201 Created
Preference-Applied: return=representation
OData-EntityId: absent
```

```json
{
  "@odata.etag": "W/\"845120\"",
  "accountid": "50000000-0000-0000-0000-000000000002",
  "name": "South depot"
}
```

Which identity-reading rule should the helper use?

### Options

**A**

Read the GUID from the OData-EntityId URI for both the default and represented creates.

**B**

Read accountid from the JSON body for both the default and represented creates.

**C**

Read the GUID from the OData-EntityId URI for the default create and read @odata.etag from the JSON body for the represented create.

**D**

Read the GUID from the OData-EntityId URI for the default create and read accountid from the JSON body for the represented create.

Correct answer: D

### Explanation

The successful default create returns an empty 204 response and exposes the created row's URI in OData-EntityId; extract the GUID from that URI. With Prefer: return=representation, the successful create returns 201 and the requested row data. Read accountid from that JSON body; this response variant does not return OData-EntityId. The helper therefore needs to read identity from the response variant actually requested. See [Microsoft Learn: creating rows and returning data](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/create-entity-web-api).

## Question 3

Type: single\_choice
Knowledge point: Perform operations by using the Dataverse Web API

A developer must cancel an existing row in a custom standard Dataverse table, Inspection, and change its note to `Duplicate booking`. The integration must minimize update events and audit entries for unrelated columns. The request already targets the correct row.

The current values are:

```text
statecode: 0
statuscode: 1
crb_note: Awaiting review
crb_priority: 1
```

The table permits these state/status combinations:

```text
statecode 0 — Active
  statuscode 1 — In progress (default)
statecode 1 — Inactive
  statuscode 2 — Completed (default)
  statuscode 100000003 — Cancelled
```

All listed columns are writable, and this transition is permitted. Which PATCH body should the developer send?

### Options

**A**

Send a PATCH containing `statecode=1`, `statuscode=100000003`, and `crb_note="Duplicate booking"`.

**B**

Send a PATCH containing `statecode=1` and `crb_note="Duplicate booking"`.

**C**

Send a PATCH containing `statecode=1`, `statuscode=2`, and `crb_note="Duplicate booking"`.

**D**

Send a PATCH containing `statecode=1`, `statuscode=100000003`, `crb_note="Duplicate booking"`, and `crb_priority=1`.

Correct answer: A

### Explanation

The cancellation requires Inactive state, the specific Cancelled status reason, and the new note. Send those three changed properties in one PATCH body. Changing statecode without statuscode selects the configured default status, which is Completed here and does not express cancellation. Including an unchanged priority can still cause update events or misleading audit entries, so it adds unrelated update activity. See [Microsoft Learn: basic updates and state/status handling](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/update-delete-entities-using-web-api).

## Question 4

Type: single\_choice
Knowledge point: Perform operations by using the Dataverse Web API

A developer is implementing an edit screen for a Dataverse table whose metadata has `IsOptimisticConcurrencyEnabled=true`. The screen retrieved the row using this request:

```text
GET /api/data/v9.2/crb_inspectionrecords(60000000-0000-0000-0000-000000000001)?$select=crb_note
```

The response contained:

```json
{
  "@odata.etag": "W/\"73140\"",
  "crb_note": "Awaiting review"
}
```

The user changes the note. The subsequent PATCH must save only if the row still has the version the user loaded, and it must not recreate a deleted row. Which precondition should the developer add to the PATCH request?

### Options

**A**

Set `If-Match: *` on the PATCH request.

**B**

Set `If-None-Match: *` on the PATCH request.

**C**

Set `If-Match: W/"73140"` on the PATCH request.

**D**

Set `If-None-Match: W/"73140"` on the PATCH request.

Correct answer: C

### Explanation

The save must be conditional on the row still matching the version retrieved for the user. Send If-Match with the exact returned ETag. A different current version causes the update to fail with 412 Precondition Failed. If-Match: \* only requires an existing row and prevents an upsert from creating one; it does not compare the user's retrieved version. If-None-Match: \* instead prevents updating an existing row. See [Microsoft Learn: conditional operations and optimistic concurrency](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/perform-conditional-operations-using-web-api).

## Question 5

Type: single\_choice
Knowledge point: Perform operations by using the Organization service

A developer is creating two components for the same Dataverse environment: a new external .NET application that must establish its own connection, and a plug-in targeting a supported .NET Framework version that reads rows during execution. Which SDK plan follows the recommended approach for these hosts?

### Options

**A**

Use Microsoft.CrmSdk.CoreAssemblies in both components and obtain IOrganizationService from the runtime's IOrganizationServiceFactory in each.

**B**

Use Microsoft.PowerPlatform.Dataverse.Client with ServiceClient in the external application; use Microsoft.CrmSdk.CoreAssemblies and the runtime's IOrganizationServiceFactory in the plug-in.

**C**

Use Microsoft.PowerPlatform.Dataverse.Client in both components and instantiate ServiceClient to establish a connection in each.

**D**

Use Microsoft.CrmSdk.CoreAssemblies and the runtime's IOrganizationServiceFactory in the external application; use Microsoft.PowerPlatform.Dataverse.Client with ServiceClient in the plug-in.

Correct answer: B

### Explanation

The execution host determines how the component obtains its service connection. Microsoft recommends ServiceClient for new external applications; Microsoft.PowerPlatform.Dataverse.Client supplies the client SDK and supports modern MSAL authentication. A plug-in references Microsoft.CrmSdk.CoreAssemblies and obtains its IOrganizationService through the factory supplied during execution. Creating a separate ServiceClient connection inside the plug-in overlooks that provided service access. See [SDK for .NET](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/org-service/overview), [plug-in project setup](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/tutorial-write-plug-in), and [plug-in service access](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/write-plug-in).

## Question 6

Type: single\_choice
Knowledge point: Perform operations by using the Organization service

An external .NET application already has an authenticated IOrganizationService named service. A helper must construct a generic OrganizationRequest, execute it, and return the GUID of a newly created account. The helper receives this populated entity:

```csharp
var account = new Entity("account");
account["name"] = "Cedar Field Services";
```

Which implementation should the helper use?

### Options

**A**

Set RequestName to "CreateRequest" and Parameters\["Target"\] to account; call service.Execute and return the Guid in the response's Results\["id"\].

**B**

Set RequestName to "Create" and Parameters\["Target"\] to an EntityReference for account; call service.Execute and return the Guid in the response's Results\["id"\].

**C**

Set RequestName to "Create" and Parameters\["Target"\] to account; call service.Execute and return the Guid in the request's Parameters\["id"\].

**D**

Set RequestName to "Create" and Parameters\["Target"\] to account; call service.Execute and return the Guid in the response's Results\["id"\].

Correct answer: D

### Explanation

A generic request uses the message name Create, an Entity input named Target, and a Guid output named id. The supplied account contains the row data, so it belongs in the request's Parameters\["Target"\]. Execute returns an OrganizationResponse, and the new identifier comes from its Results\["id"\]. CreateRequest is the typed SDK class name, while an EntityReference identifies a row rather than carrying the creation payload. See [use messages with the SDK for .NET](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/org-service/use-messages).

## Question 7

Type: single\_choice
Knowledge point: Perform operations by using the Organization service

An external .NET import worker submits five independent UpdateRequest instances in this order: North, South, East, West, Central. The ExecuteMultiple call completes with the following settings and returned collection:

```text
ContinueOnError = false
ReturnResponses = false

Responses (complete collection):
  RequestIndex = 2
  Fault.Message = "Validation failed"
```

After fixing the data for the failed request, which updates should the worker submit to finish the job without repeating successful updates?

### Options

**A**

Submit East only.

**B**

Submit North, South, East, West, and Central.

**C**

Submit East, West, and Central.

**D**

Submit South, East, West, and Central.

Correct answer: C

### Explanation

RequestIndex is zero-based, so the fault belongs to East, the third submitted update. ContinueOnError=false stops processing after that failure, leaving West and Central unprocessed. North and South completed in their own transactions and remain committed. ReturnResponses=false omits successful responses but still returns faults. The remaining work is therefore the corrected East update followed by West and Central. See [execute multiple requests](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/org-service/execute-multiple-requests).

## Question 8

Type: single\_choice
Knowledge point: Perform operations by using the Organization service

An external .NET worker must update two existing account rows in the same Dataverse environment. Both changes are represented by supported UpdateRequest messages. If either update fails, no change from this operation may remain committed; restoring a row through a later compensating update cannot satisfy the requirement. Which execution plan should the developer use?

### Options

**A**

Place both updates in one ExecuteTransactionRequest.Requests collection and execute it.

**B**

Place both updates in one ExecuteMultipleRequest with ContinueOnError=false and execute it.

**C**

Place both updates in one ExecuteMultipleRequest with ContinueOnError=true and execute it.

**D**

Execute the first update and then the second separately; if the second fails, send another UpdateRequest to restore the first row's previous values.

Correct answer: A

### Explanation

The requirement is a single commit boundary for both changes. ExecuteTransactionRequest executes the supplied requests in one database transaction and undoes changes if a request fails. ExecuteMultiple reduces client round trips, but each contained request has its own transaction; stopping after a fault cannot undo an earlier successful update. A later compensating update also leaves an intervening committed change and is explicitly outside the requirement. See [execute messages in a single transaction](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/org-service/use-executetransaction) and [execute multiple requests](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/org-service/execute-multiple-requests).

## Question 9

Type: single\_choice
Knowledge point: Implement API limit retry policies

You are adding service-protection handling to an external Dataverse Web API client that has no automatic retry behavior. The export job allows at most two retries after the initial request and stops as soon as a request succeeds. A GET request produces this response sequence: Initial attempt: HTTP 429; Retry-After: 12 First retry: HTTP 429; Retry-After: 20 Which retry policy meets the requirements for this sequence?

### Options

**A**

Wait 2 seconds before the first retry and 4 seconds before the second; report failure if the second retry fails.

**B**

Wait 12 seconds before the first retry and 20 seconds before the second; continue retrying with each new Retry-After value until success.

**C**

Wait 12 seconds before the first retry and 20 seconds before the second; report failure if the second retry fails.

**D**

Wait 12 seconds before each of the two retries; report failure if the second retry fails.

Correct answer: C

### Explanation

A Dataverse Web API service-protection response supplies Retry-After in seconds. Each retry must use the delay returned by the response that triggered it: 12 seconds for the first retry and 20 seconds for the second. The job's two-retry limit then ends the operation if it still fails. Reusing the initial delay would retry too soon after the second response; waiting correctly but continuing indefinitely would violate the job's limit. The two-retry limit is a scenario requirement, not a Dataverse default. Microsoft shows response-based delays and a configurable retry count in its [service-protection guidance](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/api-limits).

## Question 10

Type: single\_choice
Knowledge point: Implement API limit retry policies

Two external import workers call the Dataverse Web API as the same application user. Each worker can have 32 requests in flight. In a controlled test, requests from both workers are served by the same web server, and no other clients use this identity. Both workers already honor Retry-After with bounded retries. When the workers launch requests together, failures appear immediately: HTTP 429 Error code: 0x80072326 Message: Number of concurrent requests exceeded the limit of 52\. Which change directly addresses the reported cause while retaining parallel processing?

### Options

**A**

Set each worker's independent limit to 40 in-flight requests and queue additional requests within that worker.

**B**

Set one shared limit of 40 in-flight requests across both workers and queue additional requests until capacity becomes available.

**C**

Keep each worker's limit at 32 in-flight requests and wait 300 seconds before launching each combined wave.

**D**

Keep each worker's limit at 32 in-flight requests and give each worker a separate access token for the same application user.

Correct answer: B

### Explanation

The reported fault identifies the number of simultaneous requests as the problem. Both workers use the same application user and, in this test, the same web server, so their requests compete against the same service-protection limit. Their combined maximum is 64\. A shared cap of 40 keeps their aggregate concurrency below the reported limit of 52 while retaining parallel processing. Waiting between waves does not reduce a wave's concurrency, and separate tokens for the same user do not create independent user limits. The value 52 comes from this response; Microsoft notes that limits can vary by environment. See [Service protection API limits](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/api-limits).

## Question 11

Type: single\_choice
Knowledge point: Implement API limit retry policies

A Dataverse Web API integration sends every failed request through one bounded delay-and-retry loop, replaying the original credentials and request headers. Four independent requests produce these diagnostics:

| HTTP status | Diagnostic evidence |
| --- | --- |
| 401 | ExpiredAuthTicket |
| 403 | PrincipalPrivilegeDenied |
| 412 | A PATCH with a specific If-Match ETag failed because the existing row's version did not match. The table has optimistic concurrency enabled. |
| 429 | Retry-After: 8 |

Which handling plan should replace the common retry loop?

### Options

**A**

401: repair authentication; 403: repair permissions; 412: retry the unchanged conditional update after a delay; 429: retry with a bounded policy using Retry-After.

**B**

401: repair authentication; 403: retry the unchanged request after a delay; 412: read the current row and reevaluate the update; 429: retry with a bounded policy using Retry-After.

**C**

401: retry with the original credentials after a delay; 403: repair permissions; 412: read the current row and reevaluate the update; 429: retry with a bounded policy using Retry-After.

**D**

401: repair authentication; 403: repair permissions; 412: read the current row and reevaluate the update; 429: retry with a bounded policy using Retry-After.

Correct answer: D

### Explanation

The diagnostic details require different recovery paths. The expired authentication ticket requires authentication repair, and the denied privilege requires permission repair; replaying the original request after a delay fixes neither. The conditional PATCH failed because its ETag no longer matches the row version, so the client must read the current row and reevaluate the update instead of replaying the stale condition. The 429 response is service-protection throttling and belongs in the bounded Retry-After retry path. The version conflict is different from exceeding the number of simultaneous requests. These distinctions follow Microsoft's [Web API error guidance](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/compose-http-requests-handle-errors), [conditional-operation guidance](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/perform-conditional-operations-using-web-api), and [service-protection guidance](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/api-limits).

## Question 12

Type: single\_choice
Knowledge point: Optimize solution components for performance, concurrency, transactions, and bulk operations

An external .NET importer updates rows in the custom standard Shipment table in Dataverse. A support check confirms that UpdateMultiple is available for this table. Some inputs can fail server-side business validation. The updates are independent: valid inputs before and after a failing input must still commit, and the importer must identify the failed inputs. Which request design should the developer use?

### Options

**A**

Send each group of Shipment rows in an UpdateMultiple request.

**B**

Send individual UpdateRequest messages in ExecuteMultiple with ContinueOnError=true.

**C**

Send individual UpdateRequest messages in ExecuteTransaction.

**D**

Send individual UpdateRequest messages in ExecuteMultiple with ContinueOnError=false.

Correct answer: B

### Explanation

UpdateMultiple is available, but its failure behavior for standard tables does not meet the requirement to retain successful updates when another row fails. ExecuteMultiple processes each UpdateRequest in its own transaction, and ContinueOnError=true allows later inputs to run. Fault responses include RequestIndex, which identifies the failed input. See [bulk-operation guidance](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/optimize-performance-create-update) and [ExecuteMultiple behavior](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/org-service/execute-multiple-requests).

## Question 13

Type: single\_choice
Knowledge point: Optimize solution components for performance, concurrency, transactions, and bulk operations

An external .NET 8 importer uses one ServiceClient instance and Parallel.ForEachAsync to submit independent Dataverse requests. The client has 16 logical CPU cores, and the loop currently uses MaxDegreeOfParallelism=16\. A request to the same environment returns this response header: x-ms-dop-hint: 6 Which adjustment should the developer make to follow Dataverse guidance for the initial degree of parallelism?

### Options

**A**

Set MaxDegreeOfParallelism to the client's processor count of 16.

**B**

Set MaxDegreeOfParallelism to the documented default concurrent-request limit of 52.

**C**

Set MaxDegreeOfParallelism to ServiceClient.RecommendedDegreesOfParallelism, currently 6.

**D**

Remove the concurrency cap and dispatch the full pending queue.

Correct answer: C

### Explanation

The x-ms-dop-hint value gives Dataverse's current recommended degree of parallelism for the environment. ServiceClient exposes it through RecommendedDegreesOfParallelism, which should supply ParallelOptions.MaxDegreeOfParallelism. The returned value therefore supports an initial cap of 6 concurrent tasks. Client CPU count and the documented default service-protection concurrency limit serve different purposes. See [Dataverse parallel-request guidance](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/send-parallel-requests).

## Question 14

Type: single\_choice
Knowledge point: Optimize solution components for performance, concurrency, transactions, and bulk operations

An external importer creates rows in the standard Order table. A synchronous PreOperation plug-in reserves a business number by updating a shared standard Number Counter row, assigns the number to the new order, and then calls a notification endpoint. Representative trace: Create 1: counter update returns after 20 ms; notification takes 3 seconds; create completes. Create 2: its counter update returns only after Create 1 completes. Sequential creates succeed. With 12 concurrent workers, waiting and timeouts increase; no HTTP 429 responses occur. Number reservation and order creation must commit together. The notification may occur after the order commits. Which change best addresses the observed bottleneck while preserving these requirements?

### Options

**A**

Keep number reservation in synchronous PreOperation and move the notification to an asynchronous PostOperation plug-in.

**B**

Keep number reservation in synchronous PreOperation and move the notification to a synchronous PostOperation plug-in.

**C**

Keep both operations in synchronous PreOperation and increase the importer's concurrent workers from 12 to 24.

**D**

Move both number reservation and the notification to an asynchronous PostOperation plug-in.

Correct answer: A

### Explanation

The requests contend for the same Number Counter row. Although the counter update returns quickly, its lock remains held until the surrounding create transaction completes. The synchronous notification extends that transaction, so additional concurrent creates increase waiting. Keeping number reservation synchronous preserves atomic creation, while an asynchronous PostOperation notification runs outside the create transaction. See [Dataverse database transaction guidance](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/scalable-customization-design/database-transactions).

## Question 15

Type: single\_choice
Knowledge point: Optimize solution components for performance, concurrency, transactions, and bulk operations

A reviewer reads an inventory row from a custom standard Dataverse table with IsOptimisticConcurrencyEnabled=true. The row has available quantity 12 and ETag W/"8421". The reviewer decides to set the quantity to 10 based on that displayed state. An edit must not overwrite an intervening change the reviewer has not considered. The application submits a PATCH to the same row with: If-Match: W/"8421" Payload: {"crb\_availablequantity":10} Dataverse returns HTTP 412 Precondition Failed with an error stating that the existing record's version does not match the supplied row version. Which response-handling approach meets the requirement?

### Options

**A**

Retrieve the current row and ETag, then automatically resend quantity 10 with If-Match set to that ETag.

**B**

Wait using exponential backoff, then resend quantity 10 with the original If-Match ETag.

**C**

Resend quantity 10 with If-Match:\* instead of the original ETag.

**D**

Retrieve the current row and ETag, have the reviewer reevaluate the quantity, then submit any approved value with If-Match set to that ETag.

Correct answer: D

### Explanation

The specific If-Match ETag makes the update conditional on the version the reviewer read. The version-mismatch response means that condition failed. Retrieve the current row, reevaluate the intended quantity against it, and use its ETag for any newly approved update. Merely replacing the ETag and replaying the old value would bypass reconciliation; If-Match:\* checks existence rather than the reviewed version. See [Web API conditional operations](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/perform-conditional-operations-using-web-api).

## Question 16

Type: single\_choice
Knowledge point: Implement and troubleshoot authentication by using OAuth

A confidential client uses MSAL client credentials to call Dataverse. Its certificate credentials and authorized application user are already configured. The production environment URL is https://fabrikam-prod.crm.dynamics.com, and the client must request https://fabrikam-prod.crm.dynamics.com/api/data/v9.2/accounts. The development environment, https://fabrikam-dev.crm.dynamics.com, belongs to the same Microsoft Entra tenant. Which scope should the client use when acquiring the access token for this production request?

### Options

**A**

Acquire a token with the scope https://fabrikam-dev.crm.dynamics.com/.default.

**B**

Acquire a token with the scope https://fabrikam-prod.crm.dynamics.com/api/data/v9.2/.default.

**C**

Acquire a token with the scope https://fabrikam-prod.crm.dynamics.com/.default.

**D**

Acquire a token with the scope https://fabrikam-prod.crm.dynamics.com/user\_impersonation.

Correct answer: C

### Explanation

The client is confidential, so it should acquire an access token using the production environment URL followed by /.default. The Web API path identifies the request endpoint; it is not part of the environment resource used in this scope. Sharing a Microsoft Entra tenant does not make the development environment the intended resource. Microsoft documents /user\_impersonation for public clients and /.default for confidential clients. [Microsoft Learn: Use OAuth authentication with Dataverse](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/authenticate-oauth)

## Question 17

Type: single\_choice
Knowledge point: Implement and troubleshoot authentication by using OAuth

An external integration makes three independent Dataverse Web API requests to the production environment as its application user. At 14:00 UTC, diagnostics show the following; all expiration times refer to the same day. Request 1: HTTP 401\. Token audience identifies the development environment. Token expires at 14:30 UTC. Request 2: HTTP 401\. Token audience identifies the production environment. Token expires at 13:55 UTC. Request 3: HTTP 403 with PrivilegeDenied. Token audience identifies production, and the token expires at 14:30 UTC. The application user's assigned roles contain no Read privilege for the custom Dispatch table being requested. Which repair plan addresses these findings while retaining the intended caller and production target?

### Options

**A**

For requests 1 and 2, assign the application user a role granting Dispatch Read; for request 3, obtain a fresh production token.

**B**

For request 1, acquire a production-scoped token; for request 2, obtain a fresh production token; for request 3, assign the application user a role granting Dispatch Read.

**C**

For request 1, acquire a production-scoped token; for requests 2 and 3, obtain fresh production tokens.

**D**

For request 1, reuse its token while it remains unexpired; for request 2, obtain a fresh production token; for request 3, assign the application user a role granting Dispatch Read.

Correct answer: B

### Explanation

The first token has not expired, but its audience is the development environment rather than the production target. The second token targets production but has expired. These requests require an appropriate token and a fresh token, respectively. Dataverse documents invalid and expired authentication tickets among 401 failures. [Microsoft Learn: OAuth authentication](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/authenticate-oauth), [Microsoft Learn: HTTP requests and errors](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/compose-http-requests-handle-errors)

The third request has a production token that has not expired, and its PrivilegeDenied response agrees with the missing Dispatch Read privilege. Assigning the application user a security role that grants the required access addresses this authorization failure. Renewing that token alone cannot supply the absent Dataverse privilege. [Microsoft Learn: HTTP requests and errors](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/compose-http-requests-handle-errors), [Microsoft Learn: Manage application users](https://learn.microsoft.com/en-us/power-platform/admin/manage-application-users)

## Question 18

Type: single\_choice
Knowledge point: Implement and troubleshoot authentication by using OAuth

An employee signs in to a web client that calls a confidential middle-tier API. The client sends a user access token issued for that middle-tier API. The middle tier validates it and must then read Dataverse as that employee, using the employee's Dataverse permissions. The middle tier authenticates to Microsoft Entra ID with a certificate. Its registration has the required delegated Dataverse permission and consent. A separate application-user configuration also exists for unattended work, but employee requests must not run under that application user's authority. No Dataverse impersonation headers are used. Which downstream authentication plan meets the employee-request requirement?

### Options

**A**

Acquire a Dataverse token with client credentials, call as the application user, and record the employee's ID in the request log.

**B**

Use the incoming user access token in an on-behalf-of exchange to obtain a delegated Dataverse token, then call Dataverse with that downstream token.

**C**

Forward the incoming user access token directly to Dataverse because both APIs belong to the same Microsoft Entra tenant.

**D**

Acquire a separate client-credentials Dataverse token for each employee session and use those tokens as employee identities.

Correct answer: B

### Explanation

The intended Dataverse caller is the employee, even though the middle tier is a confidential client with a certificate. The on-behalf-of flow authenticates the middle tier while retaining delegated user identity in a token for the downstream API. Client credentials would instead use application authority. See [Microsoft identity platform on-behalf-of flow](https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-on-behalf-of-flow) and [Dataverse OAuth authentication](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/authenticate-oauth#giving-access-to-dataverse).

## Question 19

Type: single\_choice
Knowledge point: Perform asynchronous logic by using background operations

An external .NET integration uses IOrganizationService in a Dataverse environment where preview background operations are available. A supported custom API, contoso\_SummarizeInvoice, accepts InvoiceId and returns SummaryText. The developer has prepared an OrganizationRequest containing that API name and the required InvoiceId. The caller is authorized to invoke the API and has prvReadbackgroundoperation and prvWritebackgroundoperation. The integration must release its connection after submission and save the background-operation row identity so another worker can monitor the submitted work. Which submission and tracking approach should the developer implement?

### Options

**A**

Execute the prepared custom API request directly with service.Execute and retain BackgroundOperationId from that response.

**B**

Execute an ExecuteBackgroundOperation request containing the prepared request in its Request parameter and retain the input InvoiceId.

**C**

Execute an ExecuteBackgroundOperation request containing the prepared request in its Request parameter and retain the returned BackgroundOperationId.

**D**

Execute an ExecuteBackgroundOperation request with its Request parameter set to the custom API's name string and retain the returned BackgroundOperationId.

Correct answer: C

### Explanation

The prepared custom API request must be supplied as the OrganizationRequest-valued Request parameter of ExecuteBackgroundOperation. The returned BackgroundOperationId identifies the background-operation row; InvoiceId identifies the invoice being processed. Retaining the returned background identity lets another worker monitor this submission. The stated privileges satisfy the background-operation access requirement. See [Microsoft Learn: Request asynchronous processing](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/background-operations#request-asynchronous-processing).

## Question 20

Type: single\_choice
Knowledge point: Perform asynchronous logic by using background operations

A Dataverse client submits a supported custom API using preview background operations. It receives this immediate response with an empty body: HTTP/1.1 202 Accepted Location: https://org.contoso.example/api/backgroundoperation/8d6bba91-0893-44c5-b047-c70dc60e158a x-ms-dyn-backgroundoperationid: 8d6bba91-0893-44c5-b047-c70dc60e158a Preference-Applied: respond-async The client has not read the operation's status or received a completion notification. Which conclusion can it record from this response?

### Options

**A**

The custom API completed successfully and produced no output parameters.

**B**

The request was accepted for background processing, but the custom API's final outcome is unconfirmed.

**C**

The custom API failed because the response contains no output parameters.

**D**

The custom API has started executing, but its final outcome is unconfirmed.

Correct answer: B

### Explanation

The HTTP 202 response and applied respond-async preference establish acceptance for background processing. The tracking headers identify resources for following the operation; they do not establish that execution has started or completed. An empty submission response does not establish a business failure or a successful operation with no outputs. See [Microsoft Learn: Background operations](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/background-operations).

## Question 21

Type: single\_choice
Knowledge point: Perform asynchronous logic by using background operations

A service submits a supported custom API that returns SummaryText through Dataverse preview background operations and requests a completion callback. Dataverse later POSTs this payload to the service's callback receiver: { "location": "https://org.contoso.example/api/backgroundoperation/6147cbb8-4b7a-4b62-909f-f27986443160", "backgroundOperationId": "6147cbb8-4b7a-4b62-909f-f27986443160", "backgroundOperationStateCode": 3, "backgroundOperationStatusCode": 30 } The receiver already has a valid access token for this Dataverse environment and permission to read the operation. What should it do to retrieve the SummaryText produced by this operation?

### Options

**A**

Deserialize the callback body as the custom API's result and read SummaryText from it.

**B**

Repeat the original authenticated custom API POST and read SummaryText from its response.

**C**

Send an unauthenticated GET to the callback's location URL and read SummaryText from its response.

**D**

Send an authenticated GET to the callback's location URL and read SummaryText from its response.

Correct answer: D

### Explanation

The completion callback supplies the operation identity, status, and status-monitor location. Its state and status values indicate successful completion, but the callback does not carry the custom API's output parameters. The receiver must use its Dataverse credentials to send a GET request to the supplied status-monitor URL and read SummaryText from the result. Repeating the custom API POST invokes the API again instead of reading this operation's result. See [Microsoft Learn: Receive notification of result](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/background-operations#receive-notification-of-result).

## Question 22

Type: single\_choice
Knowledge point: Perform asynchronous logic by using background operations

A team uses Dataverse preview background operations to run a supported custom API implemented by a plug-in. Users can request cancellation while work is waiting or already executing. Some execution failures occur after cancellation was requested; others occur without cancellation. The team also proposes a new workload estimated to take five minutes in a single plug-in invocation. Which cancellation, retry, and execution plan matches the supported behavior?

### Options

**A**

Prevent work that has not started; let started work continue. Expect up to three retries for uncanceled execution failures and no retry for canceled execution failures. Redesign the five-minute workload to respect the plug-in's two-minute limit.

**B**

Prevent work that has not started; stop started work immediately. Expect up to three retries for uncanceled execution failures and no retry for canceled execution failures. Redesign the five-minute workload to respect the plug-in's two-minute limit.

**C**

Prevent work that has not started; let started work continue. Expect up to three retries for both uncanceled and canceled execution failures. Redesign the five-minute workload to respect the plug-in's two-minute limit.

**D**

Prevent work that has not started; let started work continue. Expect up to three retries for uncanceled execution failures and no retry for canceled execution failures. Use background processing to permit the five-minute plug-in invocation.

Correct answer: A

### Explanation

Cancellation prevents execution when work has not started, but it does not stop an invocation already running. If that canceled operation subsequently fails, Dataverse does not retry it. An uncanceled execution failure can receive up to three platform retries with exponential backoff. Background submission also leaves the custom API plug-in's two-minute execution limit unchanged, so the proposed five-minute invocation requires redesign. See [Microsoft Learn: Background operations](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/background-operations).

## Question 23

Type: single\_choice
Knowledge point: Perform operations by using Dataverse SDKs for .NET and Python

A developer is building two external Dataverse integrations: a new .NET application using the Organization service interface and a Python 3.10+ application with Pandas 2.0+. The Python application uses the PowerPlatform-Dataverse-Client package and calls client.records.create with one dictionary, rather than a list of payloads. Which pairing correctly identifies the SDK clients and the Python return contract?

### Options

**A**

.NET: ServiceClient in Microsoft.PowerPlatform.Dataverse.Client, implementing IOrganizationService. Python: DataverseClient in PowerPlatform.Dataverse.client, with this create call returning a list of GUID strings.

**B**

.NET: ServiceClient in Microsoft.PowerPlatform.Dataverse.Client, implementing IOrganizationService. Python: DataverseClient in PowerPlatform.Dataverse.client, with this create call returning a single GUID string.

**C**

.NET: ServiceClient in Microsoft.PowerPlatform.Dataverse.Client, implementing IOrganizationService. Python: DataverseClient in PowerPlatform.Dataverse.client, with this create call returning a CreateResponse object.

**D**

.NET: DataverseClient in PowerPlatform.Dataverse.client. Python: ServiceClient in Microsoft.PowerPlatform.Dataverse.Client, implementing IOrganizationService, with this create call returning a single GUID string.

Correct answer: B

### Explanation

The new .NET application should use ServiceClient, which implements IOrganizationService; its namespace is Microsoft.PowerPlatform.Dataverse.Client. See [the .NET SDK guide](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/org-service/overview) and [the ServiceClient reference](https://learn.microsoft.com/en-us/dotnet/api/microsoft.powerplatform.dataverse.client.serviceclient.-ctor?view=dataverse-sdk-latest). The Python application uses DataverseClient from PowerPlatform.Dataverse.client. Passing one dictionary to client.records.create returns one GUID string; passing a list returns a list of GUID strings. This input shape determines the Python return type, even though the .NET SDK also has typed request and response classes. See [Python setup](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/sdk-python/get-started) and [Python data operations](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/sdk-python/work-data).

## Question 24

Type: single\_choice
Knowledge point: Perform operations by using Dataverse SDKs for .NET and Python

A Python integration adds three single-record account creates to a batch in this order: Alder, Birch, Cedar. Each create uses one dictionary, and none is inside a changeset. The integration calls batch.execute(continue\_on\_error=True). The inspected BatchResult shows the following entries; ID-1 and ID-2 abbreviate returned GUIDs: responses\[0\]: status\_code=204, is\_success=True, entity\_id=ID-1 responses\[1\]: status\_code=400, is\_success=False, error\_message="Account rejected by a business rule" responses\[2\]: status\_code=204, is\_success=True, entity\_id=ID-2 succeeded: 2 entries; failed: 1 entry; has\_errors=True Which per-account outcomes should the integration record?

### Options

**A**

Alder succeeded with ID-1; Birch succeeded with ID-2; Cedar failed.

**B**

Alder was rolled back; Birch failed; Cedar was rolled back.

**C**

Alder succeeded with ID-1; Birch failed; Cedar was not attempted.

**D**

Alder succeeded with ID-1; Birch failed; Cedar succeeded with ID-2.

Correct answer: D

### Explanation

BatchResult.responses follows HTTP-operation submission order, so the middle failure belongs to Birch and the last success belongs to Cedar. The succeeded and failed collections are filtered subsets; their positions cannot replace positions in the complete responses list. continue\_on\_error=True allows later operations to be attempted after a failure. These requests are outside a changeset, so the failure does not imply an atomic rollback of the successful creates. See [Python batch operations and responses](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/sdk-python/work-data).

## Question 25

Type: single\_choice
Knowledge point: Perform operations by using Dataverse SDKs for .NET and Python

A Python integration is preparing client.dataframe.update("account", df, id\_column="accountid"). For an existing account, df contains a valid accountid, websiteurl=None, and telephone1=None. Both data columns are nullable and currently contain values. The customer explicitly requested removal of the website value. The telephone value was absent from the import and must retain its current value. Every candidate keeps accountid and uses it as id\_column. Which DataFrame preparation and clear\_nulls setting meets both requirements?

### Options

**A**

Remove telephone1 from the update DataFrame, retain websiteurl=None, and set clear\_nulls=True.

**B**

Keep websiteurl=None and telephone1=None in the update DataFrame, and set clear\_nulls=True.

**C**

Keep websiteurl=None and telephone1=None in the update DataFrame, and set clear\_nulls=False.

**D**

Remove websiteurl from the update DataFrame, retain telephone1=None, and set clear\_nulls=False.

Correct answer: A

### Explanation

The two None values have different business meanings. Remove telephone1 from the update DataFrame so it is outside the mutation, retain websiteurl=None, and use clear\_nulls=True to clear the requested field. The documented default skips None/NaN values, so clear\_nulls=False would leave the existing website value unchanged. Keeping both null-valued columns with clear\_nulls=True would also clear the telephone value. See [Python DataFrame updates](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/sdk-python/work-data).

## Question 26

Type: single\_choice
Knowledge point: Perform operations by using Dataverse SDKs for .NET and Python

A developer is implementing an account-retrieval wrapper for the Dataverse SDK for Python using the contract in Microsoft Learn's detailed error-handling guide. The wrapper may call the SDK operation at most three times, including the original call. Separate tests produce these HttpError values on the original call: Throttling test: status\_code=429, is\_transient=True, details={"retry\_after": 8} Service test: status\_code=503, is\_transient=True, details={} Access test: status\_code=403, is\_transient=False, details={} Which retry policy should the wrapper implement?

### Options

**A**

Set DataverseConfig.http\_retries to 3 and add no application retry loop; let the SDK retry transient HttpError responses and re-raise any HttpError that reaches the wrapper.

**B**

Make at most three calls. Retry every HttpError using details\["retry\_after"\] when supplied; otherwise wait one second after the first failed call or two seconds after the second. Re-raise the final failure.

**C**

Make at most three calls. Retry only HttpError instances with is\_transient=True, using details\["retry\_after"\] when supplied; otherwise wait one second after the first failed call or two seconds after the second. Re-raise nontransient errors or the final failure.

**D**

Make at most three calls. Retry only HttpError instances with is\_transient=True, waiting one second after the first failed call and two seconds after the second. Re-raise nontransient errors or the final failure.

Correct answer: C

### Explanation

Under the specified detailed error-handling guide, the application retries transient HttpError responses; the SDK's automatic retries cover transport-level network errors. The transient flag covers HTTP 429, 502, 503, and 504\. The 429 test supplies an eight-second delay through the exception's details dictionary. The 503 test needs the exponential fallback, while the nontransient 403 test should be re-raised immediately. A third failed call exhausts the wrapper's limit and must be re-raised. See [the detailed Python error-handling guide](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/sdk-python/error-handling).

