Microsoft Dynamics 365 CRM

Microsoft Dynamics 365 CRM stores its sales and customer-service data in Microsoft Dataverse. This integration presents the standard CRM tables and lifecycle actions while keeping the generic Microsoft Dataverse integration available for custom tables and advanced operations.

Two block operations intentionally reuse the new CRM tools under a simpler CRM label:

  • List Owners lists active users or owner-capable teams. The results are candidates; Dynamics security roles and table privileges still determine whether a particular user or team can own a record.
  • Assign Record updates the selected record's ownerid@odata.bind to an explicitly chosen user or team.

Connect one credential per Dynamics environment. The credential is bound to that environment during Microsoft OAuth, and CRM requests refuse a different environment. This release supports public-cloud Dataverse hosts only.

Usage Instructions

Manage standard Microsoft Dynamics 365 CRM records through the Dataverse Web API. List, search, create, retrieve, and update accounts, contacts, leads, opportunities, and cases; assign records to users or teams; qualify leads; close opportunities; and resolve cases. Connect a separate Microsoft credential for each environment from this Dynamics integration page or from its workflow block; existing generic Dataverse credentials remain unchanged and are not automatically rebound. This version supports public-cloud Dynamics environments; national clouds require separate OAuth authorities. Dataverse Search must be enabled for search, and lifecycle actions require the corresponding Dynamics 365 app, security role, and record privileges.

Actions

List Microsoft Dynamics 365 CRM Records

Query supported standard Microsoft Dynamics 365 CRM records. Supports OData filtering, column selection, ordering, and one bounded page at a time.

Input

ParameterTypeRequiredDescription
environmentUrlstringYesDataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestringYesEntity set name (plural table name, e.g., accounts, contacts)
selectstringNoComma-separated list of columns to return (OData $select)
filterstringNoOData $filter expression (e.g., statecode eq 0)
orderBystringNoOData $orderby expression (e.g., name asc, createdon desc)
pageSizenumberNoMaximum records in this page (default and maximum: 100)
expandstringNoNavigation properties to expand (OData $expand)
countstringNoSet to "true" to include total record count in response (OData $count)
nextLinkstringNoExact nextLink returned by a previous page of this operation
nextPageSizenumberNoExact nextPageSize returned alongside nextLink by the previous page

Output

ParameterTypeDescription
recordsarrayArray of Dataverse records. Each record has dynamic columns based on the table schema.
countnumberNumber of records returned in the current page
totalCountnumberProvider-reported matching-record count, which Dataverse may cap (requires $count=true)
totalCountLimitExceededbooleanWhether Dataverse capped the provider-reported matching-record count
nextLinkstringURL for the next page of results
nextPageSizenumberPage size that must accompany nextLink on the continuation request
successbooleanOperation success status

Get Microsoft Dynamics 365 CRM Record

Retrieve one supported standard Microsoft Dynamics 365 CRM record by its ID. Supports $select and $expand OData query options.

Input

ParameterTypeRequiredDescription
environmentUrlstringYesDataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestringYesEntity set name (plural table name, e.g., accounts, contacts)
recordIdstringYesThe unique identifier (GUID) of the record to retrieve
selectstringNoComma-separated list of columns to return (OData $select)
expandstringNoNavigation properties to expand (OData $expand)

Output

ParameterTypeDescription
recordobjectDataverse record object. Contains dynamic columns based on the queried table, plus OData metadata fields.
recordIdstringThe requested record ID
successbooleanWhether the record was retrieved successfully

Create Microsoft Dynamics 365 CRM Record

Create a new supported standard Microsoft Dynamics 365 CRM record using Dataverse logical column names.

Input

ParameterTypeRequiredDescription
environmentUrlstringYesDataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestringYesEntity set name (plural table name, e.g., accounts, contacts)
dataobjectYesRecord data as a JSON object with column names as keys

Output

ParameterTypeDescription
recordobjectDataverse record object. Contains dynamic columns based on the queried table, plus OData metadata fields.
recordIdstringThe ID of the created record
successbooleanWhether the record was created successfully

Update Microsoft Dynamics 365 CRM Record

Update an existing supported standard Microsoft Dynamics 365 CRM record. Only send the columns you want to change.

Input

ParameterTypeRequiredDescription
environmentUrlstringYesDataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
entitySetNamestringYesEntity set name (plural table name, e.g., accounts, contacts)
recordIdstringYesThe unique identifier (GUID) of the record to update
dataobjectYesRecord data to update as a JSON object with column names as keys

Output

ParameterTypeDescription
recordIdstringThe ID of the updated record
successbooleanOperation success status

Search Microsoft Dynamics 365 CRM Records

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.

Input

ParameterTypeRequiredDescription
environmentUrlstringYesDataverse environment URL (e.g., https://myorg.crm.dynamics.com\)
searchTermstringYesSearch text (1-100 chars). Supports simple syntax: + (AND), | (OR), - (NOT), * (wildcard), "exact phrase"
entitiesstringNoJSON array of search entity configs. Each object: {"name":"account","selectColumns":["name"],"searchColumns":["name"],"filter":"statecode eq 0"}
filterstringNoGlobal OData filter applied across all entities (e.g., "createdon gt 2024-01-01")
facetsstringNoJSON array of facet specifications (e.g., ["entityname,count:100","ownerid,count:100"])
topnumberNoMaximum number of results (default: 50, max: 100)
skipnumberNoNumber of results to skip for pagination
orderBystringNoJSON array of sort expressions (e.g., ["createdon desc"])
searchModestringNoSearch mode: "any" (default, match any term) or "all" (match all terms)
searchTypestringNoQuery type: "simple" (default) or "lucene" (enables regex, fuzzy, proximity, boosting)

Output

ParameterTypeDescription
resultsarrayArray of search result objects
IdstringRecord GUID
EntityNamestringTable logical name (e.g., account, contact)
ObjectTypeCodenumberEntity type code
AttributesobjectRecord attributes matching the search. Keys are column logical names.
HighlightsobjectHighlighted search matches. Keys are column names, values are arrays of strings with {crmhit}/{/crmhit} markers.
ScorenumberRelevance score for this result
totalCountnumberTotal number of matching records across all tables
countnumberNumber of results returned in this page
facetsobjectFacet results when facets were requested. Keys are facet names, values are arrays of facet value objects with count and value properties.
successbooleanOperation success status

Qualify Microsoft Dynamics 365 Lead

Qualify a Dynamics 365 Sales lead and optionally create linked account, contact, and opportunity records.

Input

ParameterTypeRequiredDescription
environmentUrlstringYesDynamics 365 environment URL (e.g., https://myorg.crm.dynamics.com\)
leadIdstringYesGUID of the lead to qualify
createAccountbooleanYesWhether to create an account from the lead
createContactbooleanYesWhether to create a contact from the lead
createOpportunitybooleanYesWhether to create an opportunity from the lead
statusReasonnumberNoQualified lead status-reason value (default: 3)
opportunityCurrencyIdstringNoOptional transaction currency GUID for the created opportunity
opportunityCustomerIdstringNoOptional account or contact GUID for the created opportunity customer
opportunityCustomerTypestringNoCustomer table type for opportunityCustomerId: account or contact
sourceCampaignIdstringNoOptional source campaign GUID for the created opportunity
processInstanceIdstringNoOptional business process flow instance GUID for the created opportunity
processInstanceEntityTypestringNoLogical table name for the business process flow instance

Output

ParameterTypeDescription
createdEntitiesarrayEntity references returned by Dataverse for records created while qualifying the lead
successbooleanWhether the lead was qualified successfully

Close Microsoft Dynamics 365 Opportunity

Close a Dynamics 365 Sales opportunity as won or lost.

Input

ParameterTypeRequiredDescription
environmentUrlstringYesDynamics 365 environment URL (e.g., https://myorg.crm.dynamics.com\)
opportunityIdstringYesGUID of the opportunity to close
outcomestringYesOpportunity outcome: won or lost
subjectstringNoOptional subject for the opportunity-close activity (maximum 200 characters)
descriptionstringNoOptional description for the opportunity-close activity (maximum 2,000 characters)
statusReasonnumberNoOpportunity status-reason value (defaults to 3 for won or 4 for lost)

Output

ParameterTypeDescription
opportunityIdstringGUID of the closed opportunity
outcomestringThe applied opportunity outcome: won or lost
successbooleanWhether the opportunity was closed successfully

Close Microsoft Dynamics 365 Case

Resolve and close a Dynamics 365 Customer Service case.

Input

ParameterTypeRequiredDescription
environmentUrlstringYesDynamics 365 environment URL (e.g., https://myorg.crm.dynamics.com\)
caseIdstringYesGUID of the case to close
subjectstringYesSubject for the case-resolution activity (maximum 200 characters)
descriptionstringNoOptional description for the case-resolution activity (maximum 100,000 characters)
timeSpentnumberNoOptional nonnegative number of minutes spent resolving the case
statusReasonnumberNoResolved case status-reason value (default: 5)

Output

ParameterTypeDescription
caseIdstringGUID of the closed case
successbooleanWhether the case was closed successfully

On this page