# Dynamics 365

The **Dynamics 365** connector enables integrations with the [Microsoft Dynamics 365](https://www.microsoft.com/en-us/dynamics-365) CRM product. It allows you to query, create, update, or delete data stored in Dataverse, the database used by Dynamics 365 CRM.

## **Parameters**

Configure the connector using the parameters below. Fields that support [Double Braces expressions](https://docs.digibee.com/documentation/connectors-and-triggers/double-braces) are marked in the **Supports DB** column.

{% tabs fullWidth="true" %}
{% tab title="General" %}

<table data-full-width="true"><thead><tr><th>Parameter</th><th>Description</th><th>Type</th><th>Supports DB</th><th>Default</th></tr></thead><tbody><tr><td><strong>Alias</strong></td><td>Name (alias) for this connector’s output, allowing you to reference it later in the flow using Double Braces expressions. <a href="../../double-braces/how-to-reference-data-using-double-braces/previous-steps-access">Learn more</a>.</td><td>String</td><td>✅</td><td><code>dynamics-1</code></td></tr><tr><td><strong>Fail on Error</strong></td><td>If enabled, interrupts the pipeline execution when an error occurs. If disabled, execution continues, but the "success" property will be set to false.</td><td>Boolean</td><td>❌</td><td>N/A</td></tr></tbody></table>

{% endtab %}

{% tab title="Authentication" %}

<table data-full-width="true"><thead><tr><th>Parameter</th><th>Description</th><th>Type</th><th>Supports DB</th><th>Default</th></tr></thead><tbody><tr><td><strong>BaseURL</strong></td><td>URL of the Dynamics 365 instance.</td><td>String</td><td>✅</td><td><code>https://org10ac0015.crm2.dynamics.com</code></td></tr><tr><td><strong>Dynamics Azure Account</strong></td><td>Account that contains Azure AD credentials for Dynamics 365. Supported type: <a href="https://app.gitbook.com/s/jvO5S91EQURCEhbZOuuZ/platform-administration/settings/accounts#azure-key"><strong>Azure Key</strong></a>.</td><td>Account</td><td>❌</td><td>N/A</td></tr></tbody></table>
{% endtab %}

{% tab title="Dynamics API" %}

<table data-full-width="true"><thead><tr><th width="141">Parameter</th><th>Description</th><th>Type</th><th>Supports DB</th><th width="140">Default</th></tr></thead><tbody><tr><td><strong>API Version</strong></td><td>Version of the Dynamics 365 Web API to use.</td><td>String</td><td>✅</td><td><code>9.2</code></td></tr><tr><td><strong>HTTP Method</strong></td><td>HTTP method for the Dynamics 365 request. Supported method: <code>GET</code>, <code>POST</code>   </td><td>Select</td><td>❌</td><td><code>GET</code></td></tr><tr><td><strong>Entity Name</strong></td><td>Entity to interact with in Dynamics 365 (for example, <strong>account</strong> or <strong>contact</strong>). Depending on the method and entity, additional configuration fields may appear. Displayed only after successful authentication.</td><td>Select</td><td>❌</td><td>N/A</td></tr><tr><td><strong>Interactive Mode (<code>POST</code>)</strong></td><td>If enabled, shows additional fields in the form to help you build the request. If disabled, you must manually enter the raw JSON.</td><td>Boolean</td><td>❌</td><td>False</td></tr><tr><td><strong>Body (<code>POST</code>)</strong></td><td>JSON content of the request.</td><td>JSON</td><td>✅</td><td>N/A</td></tr></tbody></table>
{% endtab %}

{% tab title="Advanced Settings" %}

<table data-full-width="true"><thead><tr><th>Parameter</th><th>Description</th><th>Type</th><th>Supports DB</th><th>Default</th></tr></thead><tbody><tr><td><strong>Request timeout (seconds)</strong></td><td>Maximum timeout for HTTP requests to the Dynamics 365 API.</td><td>Integer</td><td>❌</td><td>30</td></tr></tbody></table>
{% endtab %}

{% tab title="Documentation" %}

<table data-full-width="true"><thead><tr><th>Parameter</th><th>Description</th><th>Type</th><th>Supports DB</th><th>Default</th></tr></thead><tbody><tr><td><strong>Documentation</strong></td><td>Optional field to describe the connector configuration and any relevant business rules.</td><td>String</td><td>❌</td><td>N/A</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

## **Supported operations**

The **Dynamics 365** connector supports operations that follow the REST standard. You can perform the following HTTP methods:

* `GET`: Retrieve records
* `POST`: Create new records

### **`GET` requests**

When performing `GET` requests, the connector supports two query modes:

* **OData**: Enables straightforward data retrieval using URL-based queries.
* **FetchXML**: Allows advanced data retrieval through an XML-based query language similar to SQL.

These query modes are unavailable when the **Entity ID** parameter is provided.

### **`POST` requests**

When performing `POST` requests, the connector provides two primary ways to define the record data:

* **Body:** Allows the user to manually insert a JSON containing the specific fields and their respective values.
* **InteractMode:** Automatically generates the available fields, allowing the user to simply provide the values for each one.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digibee.com/documentation/connectors-and-triggers/connectors/enterprise-applications/dynamics-365.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
