powerplatform-dataverse-client
Unofficial Rust SDK for the Microsoft Dataverse (Power Platform) Web API.
The short-term goal is to provide Rust developers a simple yet robust SDK to building integrations with Dataverse.
The long-term goal is full feature parity with the Microsoft.PowerPlatform.Dataverse.Client.
powerplatform-dataverse-client is currently used as the Dataverse backend for Queryverse.
Features
| Feature | Supported |
|---|---|
| Client-credentials auth | ✅ |
| Device code auth | ✅ |
| Automatic token refresh | ✅ |
| Token cache | ✅ |
| FetchXML retrieval | ✅ |
| FetchXML paging | ✅ |
| FetchXML paging progress callback | ✅ |
| FetchXML count helper | ✅ |
| Entity definitions metadata | ✅ |
| Entity attributes metadata | ✅ |
| Entity relationships metadata | ✅ |
| Create entity | ✅ |
| Update entity by ID | ✅ |
| Delete entity by ID | ✅ |
Batch operations (ExecuteMultiple-style) |
✅ |
| Dataverse request-parameter headers | ✅ |
| Retrieve entity by ID | ❌ |
| Username / Password auth | ❌ |
| Retry/backoff | ❌ |
| Full feature parity with the XRM SDK | ❌ |
Quick Start
use LogLevel;
use ServiceClient;
async
Samples
cd samples/<sample-name>
cp secrets.example.json secrets.json
cargo run
hello-dataverse is the smallest sample.
v1-features contains one scenario per feature:
- Device code auth scenario
- Device code progress scenario
- Client credentials auth scenario
- Metadata scenario
- Data types scenario
- FetchXML scenario
- CRUD scenario
- Request parameters scenario
- Batch scenario
- Refresh demo scenario
Documentation Index
Dataverse Service Client
ServiceClient is the main Dataverse Web API entry point for FetchXML, metadata, CRUD, and batch operations.
Entity and Value Types
The crate exposes typed Dataverse row/value shapes such as Entity, EntityReference, Money, and Value.
See doc/entity-types.md.
Metadata Types
The crate exposes EntityDefinition, EntityAttribute, AttributeTypeName, and EntityRelationship for schema-driven workflows.
See doc/metadata-types.md and doc/metadata.md.
Logging
LogLevel controls the crate's own request/debug verbosity.
See doc/logging.md.
Authentication
Authentication centers on AuthConfig, device-code progress events, token refresh, and token cache handling.
See:
- doc/authentication.md
- doc/client-credentials-auth.md
- doc/device-code-auth.md
- doc/token-refresh.md
- doc/token-cache.md
Request Parameters
RequestParameters maps supported Dataverse optional request headers onto create, update, and delete operations.
See doc/request-parameters.md.
Batch Operations
Batch operations use ExecuteMultipleRequest, ExecuteMultipleResponse, and the typed create/update/delete request wrappers.
See doc/batch.md.
Contributing
Issues and pull requests are welcome. Please include a brief description of the change and, when possible, add or update tests.
AI Disclosure
Portions of this project were developed with the assistance of AI tools; all changes are reviewed and tested by maintainers.
License
See LICENSE.