> For the complete documentation index, see [llms.txt](https://docs.pascom.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pascom.net/en/integrations/connector/contacts-microsoft-exchange.md).

# Contacts from Microsoft Exchange

Integrate your Microsoft Exchange in to your PASCOM cloud phone system

<figure><img src="https://2713225-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVIw0BpSv358R2Pr2HflD%2Fuploads%2Fgit-blob-90ba278ceb52fe4cb38f8f2a5254f23b339bb998%2Fmicrosoft_exchange.png?alt=media" alt="microsoft exchange" width="50%"><figcaption></figcaption></figure>

## Concept

The PASCOM Microsoft Exchange Connector provides you with the option for synchronizing public, personal and shared Exchange Address Books with your PASCOM PBX server based telephone books.

Microsoft Exchange is also supported when using a hosted Office 365.

{% hint style="success" %}
System requirements are **Exchange 2013 SP1** or higher, **Office 365** or **Exchange Online**.
{% endhint %}

### Public Address Books

PASCOM cloud phone systems connect to the Exchange Server via a PASCOM Exchange User specially created for this purpose. The Connector recursively searches through all public folders for address books, which it then automatically synchronizes with the PASCOM PBX company phone book.

Should you wish to not sync specific address books, simply revoke the PASCOM Exchange user's read permissions for these address books.

### Personal Address Books

The connector also searches for personal address books belonging to an Exchange user and synchronizes these with the corresponding PASCOM cloud phone system user's personal address book.

This function can be used in 2 ways:

**Impersonation type: username\@domain**.

* Username in PASCOM and Exchange must be identical.
* The PASCOM Exchange user must have the *Impersonation* right.
* Example: <mmustermann@pascom.onmicrosoft.com>

**Impersonation type: Email**

* User assignment is based on the mail address ("Voicemail Email" in basic user data).
* If this mail address is not set for a user, a fallback to the above type is done.

### Standard Field Mapping

The field mapping can be completely modified / adapted as required. As standard, field mapping is preset as follows:

| pascom            | Exchange                        |
| ----------------- | ------------------------------- |
| Display Name      | Name                            |
| Telephone         | Business telephone number       |
| Forename          | First name                      |
| Surname           | Last name                       |
| Organisation      | Company Name                    |
| Fax               | Fax telephone number > business |
| E-mail            | E-mail                          |
| Mobile            | Mobile telephone number         |
| Telephone private | Private telephone number        |

## Configuration

### Microsoft Exchange

As stated above, the PASCOM Connector requires its own Exchange User. To do this, simply add a new user with the name (for example) **pascom**.

Next, ensure that the PASCOM user has read permissions for all relevant public folders.

{% hint style="info" %}
In order to allow the connector to retrieve the data, the Exchange user needs the following roles: **Discovery Management** and **Organization Management** (both together).
{% endhint %}

Should you wish to synchronize personal address books, then also assign the PASCOM user with the role *Impersonation*. Further instructions on how to do this can be found [here](https://www.codetwo.com/kb/how-to-set-impersonation-rights-manually/).

### Create Connector Profile

To create a new connect profile, open the PASCOM PBX web UI and navigate to **Settings** > **Connector** > **Add**.

Search for the template **Exchange Contacts** and click **Select** . The following data will then be requested:

| Field          | Description                                                                                       |
| -------------- | ------------------------------------------------------------------------------------------------- |
| **Name**\*     | Connector profile name                                                                            |
| **E-mail**\*   | E-mail address belonging to the previously added PASCOM Exchange User e.g. `pascom@mycompany.com` |
| **Password**\* | PASCOM Exchange User password                                                                     |

The PASCOM PBX will then try to automatically establish the Exchange User's domain and URL using the entered e-mail address. This will only function when the DNS server and domain structure (e.g. by Office365) are correctly setup.

Should the process fail, you can add the Domain and URL manually:

| Field      | Description                                                                   |
| ---------- | ----------------------------------------------------------------------------- |
| **Domain** | Active Directory Domain Name                                                  |
| **URL**    | The EWS interface URL e.g. `https://exchange.mycompany.com/ews/exchange.asmx` |

### Import Simulation & start data import

By clicking on **Save and simulate** you start a test import and you will get the first 500 data records.

If you are satisfied with the result you can click **Action** to perform the data import completely.

### Adapt Field Mapping (Optional)

Within the Connector profile, you can modify the PASCOM > Exchange field mapping via the **Variables** and **Structure** tabs.

For example, should you want to save the contact's website address within the notes field of the PASCOM Telephone Book, this can be done as follows:

Go to the **Variables** tab and via the **Add** button, paste the following line:

| Variable         | Source                             |
| ---------------- | ---------------------------------- |
| BusinessHomePage | `return $row['BusinessHomePage'];` |

{% hint style="info" %}
As opposed to other Connector profiles, the variable name and the source field name (here "BusinessHomePage") must be identical.
{% endhint %}

Through this modification, the Connector will save the content of the Exchange field "BusinessHomePage" in the identically named Variable "BusinessHomePage".

This variable muss now be assigned to a PASCOM field via the **Structure** tab.

To do this simply add the following line

```
  "028pho_notes" :        "{{{BusinessHomePage}}}",
```

to the structure:

```
  {
    "phonebook": [{
      "028pho_bez" :            "{{{DisplayName}}}",
      "028pho_phone" :          "{{{PhoneNumbers_BusinessPhone}}}",
      "028pho_firstname" :      "{{{GivenName}}}",
      "028pho_lastname" :       "{{{Surname}}}",
      "028pho_organisation" :   "{{{CompanyName}}}",
      "028pho_email" :          "{{{EmailAddresses_EmailAddress1}}}",
      "028pho_mobile" :         "{{{PhoneNumbers_MobilePhone}}}",
      "028pho_homephone" :      "{{{PhoneNumbers_HomePhone}}}",
      "028pho_fax" :            "{{{PhoneNumbers_BusinessFax}}}",
      "028pho_notes" :          "{{{BusinessHomePage}}}",
      "011acc_id":              "{{{local_id}}}"
    }]
  }
```

This will assign the variable **BusinessHomePage** to the PASCOM Telephone Book **028pho\_notes** field.

#### Available Exchange Fields

* DisplayName
* Initials
* GivenName
* Surname
* MiddleName
* NickName
* CompleteName
* Birthday
* Generation
* CompanyName
* JobTitle
* Department
* OfficeLocation
* BusinessHomePage
* PostalAddressIndex
* SpouseName
* WeddingAnniversary
* FileAs
* FileAsMapping
* PhoneNumbers\_AssistantPhone
* PhoneNumbers\_BusinessFax
* PhoneNumbers\_BusinessPhone
* PhoneNumbers\_BusinessPhone2
* PhoneNumbers\_CompanyMainPhone
* PhoneNumbers\_HomeFax
* PhoneNumbers\_HomePhone
* PhoneNumbers\_HomePhone2
* PhoneNumbers\_MobilePhone
* PhoneNumbers\_OtherFax
* PhoneNumbers\_OtherTelephone
* PhoneNumbers\_Pager
* PhoneNumbers\_RadioPhone
* EmailAddresses\_EmailAddress1
* EmailAddresses\_EmailAddress2
* EmailAddresses\_EmailAddress3
* PhysicalAddresses\_Home
* PhysicalAddresses\_Business
* PhysicalAddresses\_Other
* ImAddresses\_ImAddress1
* ImAddresses\_ImAddress2
* ImAddresses\_ImAddress3

#### Available PASCOM Fields

| Name                 | Description       |
| -------------------- | ----------------- |
| 028pho\_bez          | Display Name      |
| 028pho\_phone        | Telephone         |
| 028pho\_firstname    | Forename          |
| 028pho\_lastname     | Surname           |
| 028pho\_organisation | Organisation      |
| 028pho\_email        | E-mail            |
| 028pho\_mobile       | Mobile            |
| 028pho\_homephone    | Telephone private |
| 028pho\_fax          | Fax               |
| 028pho\_notes        | Notes             |

### Using Labels (Optional)

PASCOM Labels can be used to display additional information from the Exchange within the PASCOM Company Phonebook.

In this example, we will save Exchange contact's work department using the label **Department**. This label will then not only be visible in the telephone book, but also in the call history logs as well as various additional caller information masks.

#### Add Labels

To add a label, navigate to **ACD** > **Call Labels** and click on the **Add** button.

Select the option **Generic Label**, enter **Department** as the label name and then click **Save**.

Apply all outstanding jobs in order to complete the Label addition process.

#### Modify a Connector Profile

Go to the **Variables** tab and via the **Add** button, paste the following line:

| Variable   | Source                       |
| ---------- | ---------------------------- |
| Department | `return $row['Department'];` |

{% hint style="info" %}
As opposed to other Connector profiles, the variable name and the source field name (here "Department") must be identical.
{% endhint %}

Through this modification, the Connector will save the content of the Exchange field "Department" in the identically named Variable "Department".

This variable muss now be assigned to a PASCOM field via the **Structure** tab.

To do this simply add the following line:

```
  "post": {
              "phonebook.phonebooklabel": [
                  {
                      "050lab_bez": "Department",
                      "028050pholab_value": "{{{Department}}}"
                  }
              ]
  }
```

to the Structure:

```
  {
    "phonebook": [{
      "028pho_bez" :          "{{{DisplayName}}}",
      "028pho_phone" :        "{{{PhoneNumbers_BusinessPhone}}}",
      "028pho_firstname" :    "{{{GivenName}}}",
      "028pho_lastname" :     "{{{Surname}}}",
      "028pho_organisation" : "{{{CompanyName}}}",
      "028pho_email" :        "{{{EmailAddresses_EmailAddress1}}}",
      "028pho_mobile" :       "{{{PhoneNumbers_MobilePhone}}}",
      "028pho_homephone" :    "{{{PhoneNumbers_HomePhone}}}",
      "028pho_fax" :          "{{{PhoneNumbers_BusinessFax}}}",
      "028pho_notes" :        "{{{BusinessHomePage}}}",
      "011acc_id":            "{{{local_id}}}",
      "post": {
              "phonebook.phonebooklabel": [
                  {
                      "050lab_bez": "Department",
                      "028050pholab_value": "{{{Department}}}"
                  }
              ]
      }

    }]
  }
```

This will assign all Exchange contacts with an entered department value with the Call Label **Department** and corresponding value.

#### Check Results

{% hint style="info" %}
Label assignments will NOT be displayed when using the "Save and Simulate" tool.
{% endhint %}

To check whether the label assignment has been successful, go to the PASCOM PBX Web-UI menu options **Users** > **Phonebook**. Select and **Edit** an appropriate user and check whether the assignment was successful under the **Labels** tab. Alternatively, you can check your results by accessing the Company Phonebook via the PASCOM Desktop App.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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 following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pascom.net/en/integrations/connector/contacts-microsoft-exchange.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

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.
