Configure AD plugin

Config file settings

The plugin has a Config file called : CrmPluginActiveDirectory.dll.config

This configuration file also us to configure which fields are shown to the agent in the extension window and which queries will be used for data retrieval. Each configurable section will be discussed. We will start wilt the Contact mapping:

Contact mapping: Regular fields


<add key="Name" value="displayName"/>

<add key="Email" value="mail"/>

<add key="ContactsColumn2" value="mail"/>

<add key="Id" value="samaccountname"/>


The key names of these fields cannot be changed. The value fields are ldap attribute names. The value fields are configurable.

  • Key Name is the name field in the extension window. The value is the name of the that will be shown in the extension window.

  • Key Email is the email field in the extension window.

  • Key ContactsColumn2 is the value in the second headers of the Contact selection overview.

  • Key Id is an identifier to distinguish between the retrieved contact records.


Contact mapping: Additional fields


<add key="San" value="samaccountname"/>

<add key="Telephone" value="telephoneNumber"/>

<add key="Mobile" value="mobile"/>

<add key="Department" value="department"/>

<add key="UPNIn Windows Active Directory, a User Principal Name (UPN) is the name of a system user in an email address format. A UPN (for example: consists of the user name (logon name), separator (the @ symbol), and domain name (UPN suffix)." value="userPrincipalName"/>


Both the key names and the value settings can be changed. The key name will be the name of the field displayed in the extension window. The value is the name of the Ldap attribute that is connected to this field. The ldap atrribute value will be displayed in the extension window contact information fields.


Contact mapping: Hyperlink fields


<add key="SipUriUrl" value="{0}"/>

<add key="MainUrl" value=""/>


Contact mapping: AD Hyperlink Fields


<add key="Email" value="mail"/>

<add key="HomePage" value="wWWHomePage"/>


Some Active Directory attributes have hyperlinks like the email attribute or homepage attribute.

The key is the name of a contact info field in the extension window. The value is an attribute in ldap.

In this section both the key as value fields can be changed. Unnecessary fields can be removed.


Other settings


<add key="QueryByPhoneNumber" value="(&amp;(&amp;(objectCategory=person)(objectClass=user))(|(mobile={0})(telephoneNumber={0})))"/>

<add key="QueryBySipUri" value="(&amp;(&amp;(objectCategory=person)(objectClass=user))(|(mail={0})(msRTCSIP-PrimaryUserAddress={1})))"/>

<add key="AllResultsQuery" value="(&amp;(&amp;(objectCategory=person)(objectClass=user))(|(mail={0})(samaccountname={0})(displayName=*{0}*)))"/>

<add key="DisplayNameQuery" value="(&amp;(objectCategory=person)(objectClass=user)(displayName=*{0}*))"/>

<add key="SamAccountquery" value="(&amp;(objectCategory=person)(objectClass=user)(samaccountname={0}))"/>

<add key="EmailQuery" value="(&amp;(objectCategory=person)(objectClass=user)(mail={0}))"/>

<add key="EmailDomainFilter" value=""/>

<add key="SipUriDomainFilter" value=""/>

<add key="ADPhoneNumberFormatIsE164" value="false"/>

<add key="ContactsSearchFilters" value="All Results, ;Name, DisplayNameQuery:;SAM account, SamAccountquery:;Email, EmailQuery:"/>


  • The Active Directory queries are stored in section apSettings. The first 3 query key names QueryByPhoneNumber, QueryBySipUri, AllResultsQuery are regular query key names. The key names should not be changed. The queries in the value fields can be changed or made empty if required.

  • The other queries (in this case DisplayNameQuery, SamAccountquery, EmailQuery) are queries related to searchfilters in the extension window. Both the key name as the query can be customized as long as the key name of the query matches with the second value of a filter in setting ContactsSearchFilters. Additional queries can be added or queries can be removed if necessary.

  • Field EmailDomainFilter is used in combination with the hyperlink url SipUriUrl . If a caller has been identified on the incoming phone number and an email has been retrieved from the AD record, the EmailDomainFilter can be used to determine if the emailfield has the right email domain name. If not, hyperlink SipUriUrl will not be used but url MainUrl. The same applies to the incoming sip URI for setting SipUriDomainFilter.

  • If setting ADPhoneNumberFormatIsE164 is set to true, a phone number match will only take place on the E164 format, otherwise a more elaborate phone number check will be done to determine a matching phone number in AD.


Additional info

The Active Directory Plugin does not support cases. To hide the cases overview in the extension window, open the web.config file of the extension window and set setting ShowCasesOverview to false:

<add key="ShowCasesOverview" value="false"/>

The Assign and Unassign buttons in the extension window are also not supported. To hide these buttons set the setting ShowAssignButton in the extension window web.config to false:

<add key="ShowAssignButton" value="false"/>