> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useparagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dynamics 365 Sales

## Required Scopes

To configure a Sync for Dynamics 365 Sales, you need to request the following scopes from your Microsoft OAuth application:

* `offline_access`
* `user_impersonation`

Learn more about configuring scopes for your app in [Adding Integrations](/getting-started/adding-an-integration#create-a-developer-app).

## Synced Objects

Dynamics 365 supports the following Synced Objects:

* [Contacts](/managed-sync/api/contact-schema)
* [Companies](/managed-sync/api/company-schema)
* [Deals](/managed-sync/api/deal-schema)
* [Custom Objects](/managed-sync/api/custom-object-schema)

## Contacts

### Sync Configuration Options

```json Example theme={null}
{
    "integration": "microsoftDynamics",
    "pipeline": "contacts",
    "configuration": {
        "view": {
            "type": "savedquery",
            "id": "00000000-0000-0000-0000-000000000000"
        }
    }
}
```

<ParamField path="view" type="object">
  A Dynamics 365 view configuration to limit the Sync scope to. If not specified, the Sync will ingest all available contacts from the user's Dynamics 365 account.

  <Expandable title="view properties">
    <ParamField path="type" type="string">
      The type of view: either `savedquery` or `userquery`.
    </ParamField>

    <ParamField path="id" type="string">
      The ID of the saved query or user query.
    </ParamField>
  </Expandable>
</ParamField>

## Companies

### Sync Configuration Options

```json Example theme={null}
{
    "integration": "microsoftDynamics",
    "pipeline": "companies",
    "configuration": {
        "view": {
            "type": "savedquery",
            "id": "00000000-0000-0000-0000-000000000000"
        }
    }
}
```

<ParamField path="view" type="object">
  A Dynamics 365 view configuration to limit the Sync scope to. If not specified, the Sync will ingest all available companies from the user's Dynamics 365 account.

  <Expandable title="view properties">
    <ParamField path="type" type="string">
      The type of view: either `savedquery` or `userquery`.
    </ParamField>

    <ParamField path="id" type="string">
      The ID of the saved query or user query.
    </ParamField>
  </Expandable>
</ParamField>

## Deals

### Sync Configuration Options

```json Example theme={null}
{
    "integration": "microsoftDynamics",
    "pipeline": "deals",
    "configuration": {
        "view": {
            "type": "savedquery",
            "id": "00000000-0000-0000-0000-000000000000"
        }
    }
}
```

<ParamField path="view" type="object">
  A Dynamics 365 view configuration to limit the Sync scope to. If not specified, the Sync will ingest all available deals from the user's Dynamics 365 account.

  <Expandable title="view properties">
    <ParamField path="type" type="string">
      The type of view: either `savedquery` or `userquery`.
    </ParamField>

    <ParamField path="id" type="string">
      The ID of the saved query or user query.
    </ParamField>
  </Expandable>
</ParamField>

## Custom Objects

### Sync Configuration Options

```json Example theme={null}
{
    "integration": "microsoftDynamics",
    "pipeline": "custom_objects",
    "configuration": {
        "customObjectName": "new_customentity",
        "view": {
            "type": "userquery",
            "id": "11111111-2222-3333-4444-555555555555"
        }
    }
}
```

<ParamField path="customObjectName" type="string" required>
  The API name of the Dynamics 365 custom entity to sync, e.g., `new_customentity`.
</ParamField>

<ParamField path="view" type="object">
  A Dynamics 365 view configuration to limit the Sync scope to. If not specified, the Sync will ingest all available records for the custom object from the user's Dynamics 365 account.

  <Expandable title="view properties">
    <ParamField path="type" type="string">
      The type of view: either `savedquery` or `userquery`.
    </ParamField>

    <ParamField path="id" type="string">
      The ID of the saved query or user query.
    </ParamField>
  </Expandable>
</ParamField>
