# SCA Configuration - SecContacts.ServiceUrls

### **SecContacts.ServiceUrls** <a href="#seccontacts.serviceurls" id="seccontacts.serviceurls"></a>

This setting is for adding service URLs of custom Dataverse data sources, e.g., Dynamics 365.\
It enables Secure Contacts App (SCA) to connect to [D365](/documentation/data-sources/d365-dynamics-365.md) or Dataverse ([DVRS](/documentation/data-sources/dvrs-dataverse.md)) as data sources.

* Name: `SecContacts.ServiceUrls`
* Value: `[{"name":"<service ID>", "value":"<service URL>"}]`

The Value property is a JSON array of name-value pairs. Each entry represents one data source connection.

SCA treats each entry as an **individual data source**:

* If there is only one entry of a given `name` (e.g., a single `D365`), it is used as the default data source and no numbering is applied.
* If there are multiple entries of the same `name`, SCA assigns sequential IDs automatically, such as `D3651`, `D3652`, `DVRS1`, `DVRS2`, and so on.

Filters (`apiFilter`) can be used to split one data source into multiple logical subsets.

### Configuration fields

**Common fields (D365 & DVRS)**

<table><thead><tr><th width="120.42828369140625">Field</th><th width="129.5714111328125">Type</th><th width="110.2857666015625">Required</th><th>Description</th><th>Notes</th></tr></thead><tbody><tr><td><code>name</code></td><td>string</td><td>Yes</td><td>Must be either <code>D365</code> or <code>DVRS</code>.</td><td>Multiple entries allowed if each has a distinct <code>apiFilter</code>.</td></tr><tr><td><code>value</code></td><td>string (URL)</td><td>Yes</td><td>Base service URL of the data source.</td><td>Must be a valid HTTPS Dynamics 365 or Dataverse URL.</td></tr><tr><td><code>apiFilter</code></td><td>string (OData filter)</td><td>Optional</td><td>Splits the data source into subsets or restricts records.</td><td>If omitted, all contacts are retrieved.</td></tr></tbody></table>

**D365-only fields (for customized contact entities)**

These optional mappings let you add additional custom fields if the Dynamics 365 contact entity has been customized. If the contacts use the standard schema, these fields are not required.

<table><thead><tr><th width="201.85723876953125">Field</th><th width="119">Type</th><th width="110.142822265625">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>ccHomePhone</code></td><td>string</td><td>Optional</td><td>Name of the column that holds the home phone number.</td></tr><tr><td><code>ccBusinessPhone</code></td><td>string</td><td>Optional</td><td>Name of the column that holds the business phone number.</td></tr><tr><td><code>ccMobilePhone</code></td><td>string</td><td>Optional</td><td>Name of the column that holds the mobile phone number.</td></tr><tr><td><code>ccPrivateMobilePhone</code></td><td>string</td><td>Optional</td><td>Name of the column that holds the private mobile phone number.</td></tr><tr><td><code>ccEmailAddress</code></td><td>string</td><td>Optional</td><td>Name of the column that holds the email address.</td></tr></tbody></table>

### Examples

**Minimal configuration (required fields only)**

```json
[
  {
    "name": "D365",
    "value": "https://yourorg.crm.dynamics.com"
  }
]
```

**Splitting one data source with filters**

```json
[
  {
    "name": "DVRS",
    "value": "https://yourorg.crm.dynamics.com",
    "apiFilter": "startswith(fullname,'A')"
  },
  {
    "name": "DVRS",
    "value": "https://yourorg.crm.dynamics.com",
    "apiFilter": "startswith(fullname,'M')"
  }
]
```

Auto-enumeration applies because there are multiple entries of the same type (DVRS):

* First entry → `DVRS1`
* Second entry → `DVRS2`

Each `apiFilter` defines the subset of contacts retrieved for that data source.

**Using D365-specific custom fields**

```json
[
  {
    "name": "D365",
    "value": "https://yourorg.crm.dynamics.com",
    "ccMobilePhone": "MobilePhoneCustom",
    "ccPrivateMobilePhone": "PrivateMobileCustom",
    "ccEmailAddress": "EmailCustom"
  }
]
```

Replace each placeholder with the actual name of the corresponding column in the Dynamics 365 contact entity. For example, replace `<MobilePhoneCustom>` with the actual column name.

Single entry with optional D365-only fields. This will be treated as the default `D365` data source.

### Permissions & Security Considerations

* Data access depends on the user’s role and privileges in Dynamics 365 or Dataverse.
* Within D365/DVRS, users need a security role with at least read access to the `contact` entity (and any custom fields referenced, such as `<MobilePhoneCustom>`).

{% hint style="success" %}
[Rename SCA data sources](/documentation/app-configuration-policy-name-values-for-sca/sca-configuration-seccontacts.customdatasourcenames.md) to make them clear and understandable for end users
{% endhint %}


---

# 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.secure-contacts.com/documentation/app-configuration-policy-name-values-for-sca/sca-configuration-connect-additional-datasource.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.
