Study guide
7.1 Dataverse Web API Operations & OAuth Authentication
Microsoft Power Platform Developer Associate PL-400
Track your progress as you read
Finished sections get a check mark.
1 Introduction, Exam Overview & Developer Toolchain
0.1 PL-400 Exam Facts 0.2 Audience Profile & Required Developer Skills 0.3 The Power Platform Developer Toolchain 0.4 Extension-Point Map & AI in the Developer Workflow
2 Create a Technical Design
1.1 Analyzing Technical Architecture and Choosing Out-of-the-Box vs. Custom Solutions 1.2 Designing Authentication, Authorization, and Security Architecture 1.3 Deciding Where Business Logic Runs and Choosing the Right Table Type 1.4 Designing Reusable Power Apps Components and Custom Connectors 1.5 Designing Dataverse Code Components, Automations, and Integrations
3 Build Power Platform Solutions
2.1 Managing Power Platform Environments for Development 2.2 Dataverse Security Roles for Code Components, Least Privilege & Troubleshooting Operational Security 2.3 Solutions, Managing Dependencies & Solution Layers 2.4 Environment Variables & Connection References 2.5 Power Platform Pipelines & CI/CD with Power Platform Build Tools
4 Implement Power Apps Improvements
3.1 Complex Power Fx Formulas and Functions 3.2 Building Reusable Canvas Component Libraries 3.3 Invoking Power Automate Cloud Flows from a Canvas App 3.4 Troubleshooting Canvas and Model-Driven Apps with Monitor and Browser Debugging Tools 3.5 Optimizing Canvas and Model-Driven App Performance
5 Extend the User Experience
4.1 The Client API Object Model & JavaScript Form Scripting 4.2 Event Handler Registration & Navigation to Custom Pages via the Client API 4.3 Client Scripting Against the Dataverse Web API; Command Bar & Buttons with Power Fx and JavaScript 4.4 PCF Fundamentals: The Component Manifest & Lifecycle Events 4.5 Implementing PCF Component Interfaces; Device, Utility & Web API Features 4.6 Packaging, Deploying & Consuming a PCF Component
6 Extend the Platform: Dataverse Plug-ins & Custom APIs
5.1 Plug-in Fundamentals & the Event Execution Pipeline Stages 5.2 Execution Context & Implementing Business Logic in Plug-ins 5.3 Pre/Post Images & Organization Service Operations in Plug-ins 5.4 Registering Plug-ins with the Plug-in Registration Tool & Optimizing Plug-in Performance 5.5 Custom API Messages & Plug-ins That Implement a Custom API 5.6 Configuring Dataverse Business Events
7 Extend the Platform: Custom Connectors
6.1 Open API Definitions: Building and Extending a Custom Connector 6.2 Authentication and Policy Templates for Custom Connectors 6.3 Importing Definitions and Creating Connectors for Azure Services 6.4 Azure Functions in Custom Connectors and Data Transformation
8 Extend the Platform: Platform APIs & Azure Functions
7.1 Dataverse Web API Operations & OAuth Authentication 7.2 Organization Service Operations, Concurrency, Transactions & Bulk Operations 7.3 Service Protection API Limits & Retry Policies 7.4 Azure Functions for Long-Running, Scheduled & Event-Driven Workloads 7.5 Authenticating to Power Platform with Managed Identities
9 Extend the Platform: Power Automate Cloud Flows
8.1 Dataverse connector triggers/actions, trigger filters & retry policies 8.2 Complex expressions & flow control with error handling 8.3 Sensitive input/output parameters & Azure Key Vault 8.4 Reusable child flows & Microsoft Entra ID service principals
10 Develop Integrations
9.1 Publishing Dataverse Events: IServiceEndpointNotificationService & the Plug-in Registration Tool 9.2 Registering Service Endpoints: Webhooks, Azure Service Bus & Event Hub 9.3 Data Synchronization with Change Tracking & Alternate Keys 9.4 Upsert-Based Synchronization with the UpsertRequest Message
11 Exam Readiness & Practice
10.1 Cross-Domain "Where Do I Implement This?" Decision Framework 10.2 Exam-Day Strategy, PL-400 Item Styles & Study Plan
7.1 Dataverse Web API Operations & OAuth Authentication
Key Takeaways Explain This Topic AI
The Dataverse Web API is an OData v4 REST/JSON interface; entity sets are the pluralized logical name of each table.
$select, $filter, $expand, $orderby, and $top are the core query options; $batch groups multiple operations, with changesets making grouped writes atomic.
Functions (GET, read-only) and Actions (POST, side effects) can be unbound or bound; custom APIs are exposed through this same mechanism.
FetchXML remains available via the fetchXml query parameter for queries too complex for OData syntax, such as multi-level aggregation.
All Web API calls require an OAuth 2.0 bearer token from Microsoft Entra ID: delegated (authorization code) for user-context calls, client credentials for unattended app-only calls via an Application User.
Last updated: July 2026
The Dataverse Web API is the primary integration surface for PL-400 developers: it is what canvas apps, custom connectors, PCF components, Azure Functions, and third-party applications use to read and write Dataverse data over plain HTTPS. Knowing how to construct efficient OData v4 requests and how to authenticate those requests with OAuth 2.0 is foundational to nearly every "Extend the platform" scenario on the exam.
OData v4 Fundamentals
The Web API implements the OData v4 protocol over REST, returning JSON. Every table is exposed as an entity set named by the pluralized logical name — the account table becomes accounts , contact becomes contacts . The base address follows the pattern https://orgname.crm.dynamics.com/api/data/v9.2/ .
CRUD operations map to standard HTTP verbs:
- Operation HTTP Verb Example
- Create POST POST /accounts with a JSON body
- Retrieve GET GET /accounts(guid)
- Update PATCH PATCH /accounts(guid) with changed fields only
- Delete DELETE DELETE /accounts(guid)
- Associate/Disassociate POST / DELETE POST /accounts(guid)/contact_customer_accounts/$ref
A POST that creates a record returns 204 No Content with an OData-EntityId header by default; adding a Prefer: return=representation header returns the full created record body instead, saving a follow-up GET .
Querying with System Query Options
The Web API supports the standard OData query options, all of which appear on the exam:
- $select — restrict the columns returned (always specify this; never pull every column)
- $filter — server-side row filtering, e.g. $filter=revenue gt 1000000 and statecode eq 0
$expand — pull related records in the same round trip, for both single-valued ( primarycontactid($select=fullname) ) and collection-valued navigation properties ( contact_customer_accounts )
- $orderby — sort results, e.g. $orderby=createdon desc
- $top and $count — limit rows and request a total count
- $apply — aggregation/grouping (OData's answer to SQL GROUP BY )
A combined example: GET /accounts?$select=name,revenue&$filter=statecode eq 0&$expand=primarycontactid($select=fullname)&$orderby=revenue desc&$top=25 .
Batch Requests
For scenarios that need many operations in one network call — bulk creates, or several dependent writes that must be atomic — the Web API exposes a $batch endpoint. A batch request is a multipart/mixed payload; operations that must succeed or fail together are grouped into a changeset , while independent GET requests can sit outside a changeset. Batching reduces round trips and is the Web API equivalent of the Organization service's ExecuteMultipleRequest .
Actions and Functions
Beyond plain CRUD, Dataverse exposes custom server-side logic through two OData constructs:
Functions are read-only, invoked with GET , and can be unbound (global, like WhoAmI() ) or bound to an entity or entity collection.
Actions perform side effects, are invoked with POST , and are similarly unbound or bound. A custom API configured as an action or function is exactly what surfaces here — once registered, it is called from the Web API the same way as any built-in action.
When a query is too complex for OData syntax — multi-level aggregation, complex joins, or paging behaviors only FetchXML supports — the Web API still accepts it via the fetchXml query parameter: GET /accounts?fetchXml=<fetch>...</fetch> .
Authenticating with OAuth 2.0
Every Web API call requires a valid OAuth 2.0 bearer token issued by Microsoft Entra ID; there is no anonymous or basic-auth path. This starts with an app registration in Entra ID, which yields an Application (client) ID and a Directory (tenant) ID , plus either a client secret or a certificate for authenticating the app itself.
Two authentication patterns cover almost every PL-400 scenario:
Pattern Flow Identity context Typical caller
Delegated Authorization code (or device code) Runs as the signed-in user, respects their security roles Interactive apps, PCF context.webAPI calls
Application (app-only) Client credentials Runs as an Application User with its own security role, no signed-in user Azure Functions, unattended services, custom connectors
For app-only calls, the app registration must be added to the target environment as an Application User and assigned a security role — the client ID alone grants no Dataverse permissions. The token request targets the resource https://orgname.crm.dynamics.com/.default , and the resulting token is sent as Authorization: Bearer <token> . The Microsoft Authentication Library (MSAL) is the supported library for acquiring these tokens in both .NET and JavaScript/Node code, handling token caching and refresh so custom code doesn't have to.
A Practical Token Request
An app-only (client credentials) token request against the Microsoft identity platform's /token endpoint looks like this in outline: POST https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded
- grant_type=client_credentials
- &client_id={applicationId}
- &client_secret={clientSecret}
- &scope=https://orgname.crm.dynamics.com/.default
The response contains an access_token (a signed JWT) and an expires_in value in seconds — typically around one hour. Code should treat that token as opaque and short-lived: cache it for reuse across calls within its lifetime, but always be ready to request a fresh one on expiry rather than hard-coding a token value. MSAL's token cache handles this automatically for both delegated and app-only flows, which is why hand-rolling raw HTTP token requests is discouraged outside of learning exercises.
Versioning and Stability
The Web API is versioned in its URL path ( v9.1 , v9.2 , and so on). Microsoft recommends always pinning to an explicit version rather than relying on an unversioned alias, since behavior can change between major versions and an unpinned integration could break unexpectedly after a platform update. For PL-400 purposes, know that $select , $filter , $expand , batch requests, and the actions/functions model are stable, well-documented surface area that has existed across all current supported versions — the version number mainly reflects which release of Dataverse's schema and message set is being targeted.