Microsoft Dataverse
Manage records in Microsoft Dataverse tables
Integrate Microsoft Dataverse into your workflow. Create, read, update, delete, upsert, associate, query, search, and execute actions and functions against Dataverse tables using the Web API. Supports bulk operations, FetchXML, file uploads, and relevance search. Works with Dynamics 365, Power Platform, and custom Dataverse environments.
Associate two records in Microsoft Dataverse via a navigation property. Creates a relationship between a source record and a target record. Supports both collection-valued (POST) and single-valued (PUT) navigation properties.
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
entitySetName | string | Yes | No description |
recordId | string | Yes | No description |
navigationProperty | string | Yes | Navigation property name (e.g., contact_customer_accounts for collection-valued, or parentcustomerid_account for single-valued) |
targetEntitySetName | string | Yes | No description |
targetRecordId | string | Yes | No description |
navigationType | string | No | Type of navigation property: "collection" (default, uses POST) or "single" (uses PUT for lookup fields) |
| Parameter | Type | Description |
|---|
success | boolean | Whether the association was created successfully |
entitySetName | string | Source entity set name used in the association |
recordId | string | Source record GUID that was associated |
navigationProperty | string | Navigation property used for the association |
targetEntitySetName | string | Target entity set name used in the association |
targetRecordId | string | Target record GUID that was associated |
Create multiple records of the same table type in a single request. Each record in the Targets array must include an @odata.type annotation. Recommended batch size: 100-1000 records for standard tables.
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
entitySetName | string | Yes | No description |
entityLogicalName | string | Yes | Table logical name for @odata.type annotation (e.g., account, contact). Used to set Microsoft.Dynamics.CRM.{entityLogicalName} on each record. |
records | object | Yes | Array of record objects to create. Each record should contain column logical names as keys. The @odata.type annotation is added automatically. |
| Parameter | Type | Description |
|---|
ids | array | Array of GUIDs for the created records |
count | number | Number of records created |
success | boolean | Whether all records were created successfully |
Create a new record in a Microsoft Dataverse table. Requires the entity set name (plural table name) and record data as a JSON object.
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
entitySetName | string | Yes | No description |
data | object | Yes | No description |
| Parameter | Type | Description |
|---|
recordId | string | The ID of the created record |
record | object | Dataverse record object. Contains dynamic columns based on the queried table, plus OData metadata fields. |
success | boolean | Whether the record was created successfully |
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
entitySetName | string | Yes | No description |
recordId | string | Yes | No description |
| Parameter | Type | Description |
|---|
recordId | string | The ID of the deleted record |
success | boolean | Operation success status |
Remove an association between two records in Microsoft Dataverse. For collection-valued navigation properties, provide the target record ID. For single-valued navigation properties, only the navigation property name is needed.
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
entitySetName | string | Yes | No description |
recordId | string | Yes | No description |
navigationProperty | string | Yes | Navigation property name (e.g., contact_customer_accounts for collection-valued, or parentcustomerid_account for single-valued) |
targetRecordId | string | No | Target record GUID (required for collection-valued navigation properties, omit for single-valued) |
| Parameter | Type | Description |
|---|
success | boolean | Whether the disassociation was completed successfully |
entitySetName | string | Source entity set name used in the disassociation |
recordId | string | Source record GUID that was disassociated |
navigationProperty | string | Navigation property used for the disassociation |
targetRecordId | string | Target record GUID that was disassociated |
Download a file from a file or image column on a Dataverse record. Returns the file content as a base64-encoded string along with file metadata from response headers.
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
entitySetName | string | Yes | No description |
recordId | string | Yes | No description |
fileColumn | string | Yes | No description |
| Parameter | Type | Description |
|---|
fileContent | string | Base64-encoded file content |
fileName | string | Name of the downloaded file |
fileSize | number | File size in bytes |
mimeType | string | MIME type of the file |
success | boolean | Whether the file was downloaded successfully |
Execute a bound or unbound Dataverse action. Actions perform operations with side effects (e.g., Merge, GrantAccess, SendEmail, QualifyLead). For bound actions, provide the entity set name and record ID.
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
actionName | string | Yes | Action name (e.g., Merge, GrantAccess, SendEmail). Do not include the Microsoft.Dynamics.CRM. namespace prefix for unbound actions. |
entitySetName | string | No | Entity set name for bound actions (e.g., accounts). Leave empty for unbound actions. |
recordId | string | No | Record GUID for bound actions. Leave empty for unbound or collection-bound actions. |
parameters | object | No | Action parameters as a JSON object. For entity references, include @odata.type annotation (e.g., {"Target": {"@odata.type": "Microsoft.Dynamics.CRM.account", "accountid": "..."}}) |
| Parameter | Type | Description |
|---|
result | object | Action response data. Structure varies by action. Null for actions that return 204 No Content. |
success | boolean | Whether the action executed successfully |
Execute a bound or unbound Dataverse function. Functions are read-only operations (e.g., RetrievePrincipalAccess, RetrieveTotalRecordCount, InitializeFrom). For bound functions, provide the entity set name and record ID.
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
functionName | string | Yes | Function name (e.g., RetrievePrincipalAccess, RetrieveTotalRecordCount). Do not include the Microsoft.Dynamics.CRM. namespace prefix for unbound functions. |
entitySetName | string | No | Entity set name for bound functions (e.g., systemusers). Leave empty for unbound functions. |
recordId | string | No | No description |
parameters | string | No | Function parameters as a comma-separated list of name=value pairs for the URL (e.g., "LocalizedStandardName='Pacific Standard Time\ |
| Parameter | Type | Description |
|---|
result | object | Function response data. Structure varies by function. |
success | boolean | Whether the function executed successfully |
Execute a FetchXML query against a Microsoft Dataverse table. FetchXML supports aggregation, grouping, linked-entity joins, and complex filtering beyond OData capabilities.
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
entitySetName | string | Yes | No description |
fetchXml | string | Yes | FetchXML query string. Must include <fetch> root element and <entity> child element matching the table logical name. |
| Parameter | Type | Description |
|---|
records | array | Array of Dataverse records. Each record has dynamic columns based on the table schema. |
count | number | Number of records returned in the current page |
fetchXmlPagingCookie | string | Paging cookie for retrieving the next page of results |
moreRecords | boolean | Whether more records are available beyond the current page |
success | boolean | Operation success status |
Retrieve a single record from a Microsoft Dataverse table by its ID. Supports $select and $expand OData query options.
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
entitySetName | string | Yes | No description |
recordId | string | Yes | No description |
select | string | No | No description |
expand | string | No | No description |
| Parameter | Type | Description |
|---|
record | object | Dataverse record object. Contains dynamic columns based on the queried table, plus OData metadata fields. |
recordId | string | The record primary key ID (auto-detected from response) |
success | boolean | Whether the record was retrieved successfully |
Query and list records from a Microsoft Dataverse table. Supports OData query options for filtering, selecting columns, ordering, and pagination.
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
entitySetName | string | Yes | No description |
select | string | No | No description |
filter | string | No | No description |
orderBy | string | No | No description |
top | number | No | No description |
expand | string | No | No description |
count | string | No | Set to "true" to include total record count in response (OData $count) |
| Parameter | Type | Description |
|---|
records | array | Array of Dataverse records. Each record has dynamic columns based on the table schema. |
count | number | Number of records returned in the current page |
totalCount | number | Total number of matching records server-side (requires $count=true) |
nextLink | string | URL for the next page of results |
success | boolean | Operation success status |
Perform a full-text relevance search across Microsoft Dataverse tables. Requires Dataverse Search to be enabled on the environment. Supports simple and Lucene query syntax.
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
searchTerm | string | Yes | Search text (1-100 chars). Supports simple syntax: + (AND), | (OR), - (NOT), * (wildcard), "exact phrase" |
entities | string | No | JSON array of search entity configs. Each object: {"Name":"account","SelectColumns":["name"],"SearchColumns":["name"],"Filter":"statecode eq 0"} |
filter | string | No | Global OData filter applied across all entities (e.g., "createdon gt 2024-01-01") |
facets | string | No | JSON array of facet specifications (e.g., ["entityname,count:100","ownerid,count:100"]) |
top | number | No | No description |
skip | number | No | No description |
orderBy | string | No | JSON array of sort expressions (e.g., ["createdon desc"]) |
searchMode | string | No | Search mode: "any" (default, match any term) or "all" (match all terms) |
searchType | string | No | Query type: "simple" (default) or "lucene" (enables regex, fuzzy, proximity, boosting) |
| Parameter | Type | Description |
|---|
results | array | Array of search result objects |
↳ Id | string | Record GUID |
↳ EntityName | string | Table logical name (e.g., account, contact) |
↳ ObjectTypeCode | number | Entity type code |
↳ Attributes | object | Record attributes matching the search. Keys are column logical names. |
↳ Highlights | object | Highlighted search matches. Keys are column names, values are arrays of strings with {crmhit}/{/crmhit} markers. |
↳ Score | number | Relevance score for this result |
totalCount | number | Total number of matching records across all tables |
count | number | Number of results returned in this page |
facets | object | Facet results when facets were requested. Keys are facet names, values are arrays of facet value objects with count and value properties. |
success | boolean | Operation success status |
Update multiple records of the same table type in a single request. Each record must include its primary key. Only include columns that need to be changed. Recommended batch size: 100-1000 records.
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
entitySetName | string | Yes | No description |
entityLogicalName | string | Yes | Table logical name for @odata.type annotation (e.g., account, contact). Used to set Microsoft.Dynamics.CRM.{entityLogicalName} on each record. |
records | object | Yes | Array of record objects to update. Each record must include its primary key (e.g., accountid) and only the columns being changed. The @odata.type annotation is added automatically. |
| Parameter | Type | Description |
|---|
success | boolean | Whether all records were updated successfully |
Update an existing record in a Microsoft Dataverse table. Only send the columns you want to change.
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
entitySetName | string | Yes | No description |
recordId | string | Yes | No description |
data | object | Yes | No description |
| Parameter | Type | Description |
|---|
recordId | string | The ID of the updated record |
success | boolean | Operation success status |
Upload a file to a file or image column on a Dataverse record. Supports single-request upload for files up to 128 MB. The file content must be provided as a base64-encoded string.
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
entitySetName | string | Yes | No description |
recordId | string | Yes | No description |
fileColumn | string | Yes | No description |
fileName | string | Yes | No description |
file | file | No | No description |
fileContent | string | No | No description |
| Parameter | Type | Description |
|---|
recordId | string | Record GUID the file was uploaded to |
fileColumn | string | File column the file was uploaded to |
fileName | string | Name of the uploaded file |
success | boolean | Whether the file was uploaded successfully |
Create or update a record in a Microsoft Dataverse table. If a record with the given ID exists, it is updated; otherwise, a new record is created.
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
entitySetName | string | Yes | No description |
recordId | string | Yes | No description |
data | object | Yes | No description |
| Parameter | Type | Description |
|---|
recordId | string | The ID of the upserted record |
created | boolean | True if the record was created, false if updated |
record | object | Dataverse record object. Contains dynamic columns based on the queried table, plus OData metadata fields. |
success | boolean | Operation success status |
Retrieve the current authenticated user information from Microsoft Dataverse. Useful for testing connectivity and getting the user ID, business unit ID, and organization ID.
| Parameter | Type | Required | Description |
|---|
environmentUrl | string | Yes | No description |
| Parameter | Type | Description |
|---|
userId | string | The authenticated user ID |
businessUnitId | string | The business unit ID |
organizationId | string | The organization ID |
success | boolean | Operation success status |