Microsoft Dynamics
Address provider for Microsoft Dynamics 365 – uses the Microsoft Dynamics 365 Web API.
Cloud/Online
In order to use the Microsoft Dynamics 365 Web API from Dynamics 365 Online, the attribute active
must be set to true
for CloudConnectionSettings
(and to false
for OnPremiseConnectionSettings
).
For operation, the user name and password of a user who has the corresponding permissions should be stored. ManualLogin
should be set to false
.
Before the retrieval with a user works, a manual login must be performed once. For this ManualLogin
must be set to true
and the address provider must be started with the recipient dialog. Now a login window appears, where username and password have to be entered. Once this has been done, the calls with this user will work afterwards even if ManualLogin
is set to false
.
Example configuration for Dynamics 365 Online connection:
<!-- Dynamics CRM AddressProvider -->
<AddressProvider id="121CE113-143E-4125-980A-20B6341F9FC9" order="1" active="true">
<!-- Debug (default: false)
When Debug is set to 'true', log contains the requests, responses and transformed responses -->
<Debug>false</Debug>
<!-- Title for the AddressProvider -->
<Title>Dynamics CRM</Title>
<!-- URI of the web service -->
<Uri>https://my-subdomain.crm999.dynamics.com/api/data/v8.2/contacts</Uri>
<!-- Timeout in milliseconds (default: 3000) -->
<Timeout>3000</Timeout>
<!-- Icon -->
<Icon>iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAgUAEhUQMiUgYkVAcmVQgnVg4sWRAtWhs3Yh46ZB86ZShCay1Gbi1HbzBIcDpQdjtTeEZcgElegU5jhU9khlltjFtvjmBzkWN1k2Z4lX2MpX6NpoKRqY+csZunuq21xa+2x664x7G4yLe+zbi+zLzC0L7F0sXK1sbL18bM18zS3M/U3dDU3tPX4NbZ4tnd5d/i6OTn7OXo7fP09/v7/Pz8/f7+/v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIpbQccAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTczbp9jAAAAeklEQVQoU42K1w6CUBAFj2Lv3Yu9AaLYWOD8/5+ZG1YSX4zzcnYmi78Z6xZsdD9UX0B9pGKZCbA0KpaLoCkG0576hFL2aeZpP/fKg7Imtxk1rEi5kSE1DJLv0Ij5jMK4CLXr/RQcdwcvOuehvRi2SvbT6br7jj1+ArwBtM4N4Dj6Dh8AAAAASUVORK5CYII=</Icon>
<!-- Connection settings -->
<CloudConnectionSettings active="true">
<AuthorityUri>https://login.windows.net/common</AuthorityUri>
<Resource>https://my-subdomain.crm999.dynamics.com/</Resource>
<ClientId>11111111-1111-1111-1111-111111111111</ClientId>
<!-- Username and Password are only required when ManualLogin is set to 'false' -->
<Username>username@my-domain.ch</Username>
<Password>PASSWORD</Password>
<!-- ManualLogin (default: false)
When set to 'true', a login window appears.
A login via this window is required if the user has never been logged in manually with the defined client ID before. -->
<ManualLogin>false</ManualLogin>
<!-- Redirect URI is only required when ManualLogin is set to 'true' -->
<RedirecUri>https://any-subdomain.my-domain.ch</RedirecUri>
</CloudConnectionSettings>
<OnPremiseConnectionSettings active="false">
<UseDefaultCredentials>true</UseDefaultCredentials>
<!-- Network credentials are ignored when UseDefaultCredentials is set to 'true' -->
<NetworkCredential>
<UserName>myUserName</UserName>
<Password>myPassword</Password>
<Domain>myDomain</Domain>
</NetworkCredential>
</OnPremiseConnectionSettings>
<!-- Search paremeters -->
<SearchParameters>
<SearchParameter Name="company" Label="Firma" Type="String" Length="100" Sort="1" />
<SearchParameter Name="firstname" Label="Vorname/Name" Type="String" Length="100" Sort="2" />
<SearchParameter Name="lastname" Label="" Type="String" Length="100" Sort="2" Width="90" />
<SearchParameter Name="address1_line1" Label="Strasse" Type="String" Length="100" Sort="3" />
<SearchParameter Name="address1_postalcode" Label="PLZ/Ort" Type="String" Length="6" Sort="4" />
<SearchParameter Name="address1_city" Label="" Type="String" Length="100" Width="130" Sort="4" />
<SearchParameter Name="address1_country" Label="Land" Type="String" Length="100" Sort="5" />
</SearchParameters>
<!-- Contact mapping -->
<ContactMapping>
<ContactItemXPath>Contact</ContactItemXPath>
<ContactElement id="Person_Title"></ContactElement>
<ContactElement id="Person_LastName">lastname</ContactElement>
<ContactElement id="Person_FirstName">firstname</ContactElement>
<ContactElement id="Person_SecondName"></ContactElement>
<ContactElement id="Person_NickName">nickname</ContactElement>
<ContactElement id="Person_BirthDate">birthdate</ContactElement>
<ContactElement id="Person_Profession">jobtitle</ContactElement>
<ContactElement id="Person_CareOf"></ContactElement>
<ContactElement id="Person_Position"></ContactElement>
<ContactElement id="Person_Street">address1_line1</ContactElement>
<ContactElement id="Person_Apartment">address1_line2</ContactElement>
<ContactElement id="Person_Floor">address1_line3</ContactElement>
<ContactElement id="Person_City">address1_city</ContactElement>
<ContactElement id="Person_ZipCode">address1_postalcode</ContactElement>
<ContactElement id="Person_PostOfficeBox">address1_postofficebox</ContactElement>
<ContactElement id="Person_PostOfficeBoxCityZipCode"></ContactElement>
<ContactElement id="Person_PostOfficeBoxCity"></ContactElement>
<ContactElement id="Person_CountryShortCode">address1_country</ContactElement>
<!-- CountryShortCode is only mapped when Country also exists. Best practise: Map the country short code into Country and CountryShortCode. -->
<ContactElement id="Person_Country">address1_country</ContactElement>
<ContactElement id="Person_Phone">telephone1</ContactElement>
<ContactElement id="Person_Email">emailaddress1</ContactElement>
<ContactElement id="Person_Fax">fax</ContactElement>
<ContactElement id="Person_Mobile">mobilephone</ContactElement>
<ContactElement id="Person_Homepage">websiteurl</ContactElement>
<ContactElement id="Person_Initials"></ContactElement>
<ContactElement id="Company_Name">company</ContactElement>
<ContactElement id="Company_Supplement"></ContactElement>
<ContactElement id="Company_Department">department</ContactElement>
<ContactElement id="Company_Street"></ContactElement>
<ContactElement id="Company_Apartment"></ContactElement>
<ContactElement id="Company_Floor"></ContactElement>
<ContactElement id="Company_City"></ContactElement>
<ContactElement id="Company_ZipCode"></ContactElement>
<ContactElement id="Company_PostOfficeBox"></ContactElement>
<ContactElement id="Company_PostOfficeBoxCityZipCode"></ContactElement>
<ContactElement id="Company_PostOfficeBoxCity"></ContactElement>
<ContactElement id="Company_CareOf"></ContactElement>
<ContactElement id="Company_CountryShortCode"></ContactElement>
<!-- CountryShortCode is only mapped when Country also exists. Best practise: Map the country short code into Country and CountryShortCode. -->
<ContactElement id="Company_Country"></ContactElement>
<ContactElement id="Company_PhoneDirect"></ContactElement>
<ContactElement id="Company_PhoneCentral"></ContactElement>
<ContactElement id="Company_EmailDirect"></ContactElement>
<ContactElement id="Company_EmailCentral"></ContactElement>
<ContactElement id="Company_FaxDirect"></ContactElement>
<ContactElement id="Company_FaxCentral"></ContactElement>
<ContactElement id="Company_Mobile"></ContactElement>
<ContactElement id="Company_Homepage"></ContactElement>
<ContactElement id="Options_AddressingType"></ContactElement>
<ContactElement id="Options_ShowProviderLayout"></ContactElement>
<ContactElement id="Options_PersonOverFirm"></ContactElement>
<ContactElement id="Options_CountryView"></ContactElement>
<ContactElement id="Options_CountryCodeView"></ContactElement>
<ContactElement id="Options_SalutationView"></ContactElement>
<ContactElement id="Options_SalutationSeparatetLine"></ContactElement>
<ContactElement id="Options_SecondNameView"></ContactElement>
<ContactElement id="Options_PositionView"></ContactElement>
</ContactMapping>
</AddressProvider>
On Premieses
In order to use the Microsoft Dynamics 365 Web API from Dynamics 365 On-Premises, the attribute active
must be set to true
for OnPremiseConnectionSettings
(and to false
for CloudConnectionSettings
).
The requests can be sent with the credentials of the respective user (UseDefaultCredentials
is true
) or a user with domain and password can be specified for all requests:
<UseDefaultCredentials>false</UseDefaultCredentials>
<NetworkCredential>
<UserName>myUserName</UserName>
<Password>myPassword</Password>
<Domain>myDomain</Domain>
</NetworkCredential>
Example configuration for Dynamics 365 on-premises connection:
<!-- Dynamics CRM AddressProvider -->
<AddressProvider id="121CE113-143E-4125-980A-20B6341F9FC9" order="1" active="true">
<!-- Debug (default: false)
When Debug is set to 'true', log contains the requests, responses and transformed responses -->
<Debug>false</Debug>
<!-- Title for the AddressProvider -->
<Title>Dynamics CRM</Title>
<!-- URI of the web service -->
<Uri>https://my-subdomain.crm999.dynamics.com/api/data/v8.2/contacts</Uri>
<!-- Timeout in milliseconds (default: 3000) -->
<Timeout>3000</Timeout>
<!-- Icon -->
<Icon>iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAgUAEhUQMiUgYkVAcmVQgnVg4sWRAtWhs3Yh46ZB86ZShCay1Gbi1HbzBIcDpQdjtTeEZcgElegU5jhU9khlltjFtvjmBzkWN1k2Z4lX2MpX6NpoKRqY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G1YSX4zzcnYmi78Z6xZsdD9UX0B9pGKZCbA0KpaLoCkG0576hFL2aeZpP/fKg7Imtxk1rEi5kSE1DJLv0Ij5jMK4CLXr/RQcdwcvOuehvRi2SvbT6br7jj1+ArwBtM4N4Dj6Dh8AAAAASUVORK5CYII=</Icon>
<!-- Connection settings -->
<CloudConnectionSettings active="false">
<AuthorityUri>https://login.windows.net/common</AuthorityUri>
<Resource>https://my-subdomain.crm999.dynamics.com/</Resource>
<ClientId>11111111-1111-1111-1111-111111111111</ClientId>
<!-- Username and Password are only required when ManualLogin is set to 'false' -->
<Username>username@my-domain.ch</Username>
<Password>PASSWORD</Password>
<!-- ManualLogin (default: false)
When set to 'true', a login window appears.
A login via this window is required if the user has never been logged in manually with the defined client ID before. -->
<ManualLogin>false</ManualLogin>
<!-- Redirect URI is only required when ManualLogin is set to 'true' -->
<RedirecUri>https://any-subdomain.my-domain.ch</RedirecUri>
</CloudConnectionSettings>
<OnPremiseConnectionSettings active="true">
<UseDefaultCredentials>true</UseDefaultCredentials>
<!-- Network credentials are ignored when UseDefaultCredentials is set to 'true' -->
<NetworkCredential>
<UserName>myUserName</UserName>
<Password>myPassword</Password>
<Domain>myDomain</Domain>
</NetworkCredential>
</OnPremiseConnectionSettings>
<!-- Search paremeters -->
<SearchParameters>
<SearchParameter Name="company" Label="Firma" Type="String" Length="100" Sort="1" />
<SearchParameter Name="firstname" Label="Vorname/Name" Type="String" Length="100" Sort="2" />
<SearchParameter Name="lastname" Label="" Type="String" Length="100" Sort="2" Width="90" />
<SearchParameter Name="address1_line1" Label="Strasse" Type="String" Length="100" Sort="3" />
<SearchParameter Name="address1_postalcode" Label="PLZ/Ort" Type="String" Length="6" Sort="4" />
<SearchParameter Name="address1_city" Label="" Type="String" Length="100" Width="130" Sort="4" />
<SearchParameter Name="address1_country" Label="Land" Type="String" Length="100" Sort="5" />
</SearchParameters>
<!-- Contact mapping -->
<ContactMapping>
<ContactItemXPath>Contact</ContactItemXPath>
<ContactElement id="Person_Title"></ContactElement>
<ContactElement id="Person_LastName">lastname</ContactElement>
<ContactElement id="Person_FirstName">firstname</ContactElement>
<ContactElement id="Person_SecondName"></ContactElement>
<ContactElement id="Person_NickName">nickname</ContactElement>
<ContactElement id="Person_BirthDate">birthdate</ContactElement>
<ContactElement id="Person_Profession">jobtitle</ContactElement>
<ContactElement id="Person_CareOf"></ContactElement>
<ContactElement id="Person_Position"></ContactElement>
<ContactElement id="Person_Street">address1_line1</ContactElement>
<ContactElement id="Person_Apartment">address1_line2</ContactElement>
<ContactElement id="Person_Floor">address1_line3</ContactElement>
<ContactElement id="Person_City">address1_city</ContactElement>
<ContactElement id="Person_ZipCode">address1_postalcode</ContactElement>
<ContactElement id="Person_PostOfficeBox">address1_postofficebox</ContactElement>
<ContactElement id="Person_PostOfficeBoxCityZipCode"></ContactElement>
<ContactElement id="Person_PostOfficeBoxCity"></ContactElement>
<ContactElement id="Person_CountryShortCode">address1_country</ContactElement>
<!-- CountryShortCode is only mapped when Country also exists. Best practise: Map the country short code into Country and CountryShortCode. -->
<ContactElement id="Person_Country">address1_country</ContactElement>
<ContactElement id="Person_Phone">telephone1</ContactElement>
<ContactElement id="Person_Email">emailaddress1</ContactElement>
<ContactElement id="Person_Fax">fax</ContactElement>
<ContactElement id="Person_Mobile">mobilephone</ContactElement>
<ContactElement id="Person_Homepage">websiteurl</ContactElement>
<ContactElement id="Person_Initials"></ContactElement>
<ContactElement id="Company_Name">company</ContactElement>
<ContactElement id="Company_Supplement"></ContactElement>
<ContactElement id="Company_Department">department</ContactElement>
<ContactElement id="Company_Street"></ContactElement>
<ContactElement id="Company_Apartment"></ContactElement>
<ContactElement id="Company_Floor"></ContactElement>
<ContactElement id="Company_City"></ContactElement>
<ContactElement id="Company_ZipCode"></ContactElement>
<ContactElement id="Company_PostOfficeBox"></ContactElement>
<ContactElement id="Company_PostOfficeBoxCityZipCode"></ContactElement>
<ContactElement id="Company_PostOfficeBoxCity"></ContactElement>
<ContactElement id="Company_CareOf"></ContactElement>
<ContactElement id="Company_CountryShortCode"></ContactElement>
<!-- CountryShortCode is only mapped when Country also exists. Best practise: Map the country short code into Country and CountryShortCode. -->
<ContactElement id="Company_Country"></ContactElement>
<ContactElement id="Company_PhoneDirect"></ContactElement>
<ContactElement id="Company_PhoneCentral"></ContactElement>
<ContactElement id="Company_EmailDirect"></ContactElement>
<ContactElement id="Company_EmailCentral"></ContactElement>
<ContactElement id="Company_FaxDirect"></ContactElement>
<ContactElement id="Company_FaxCentral"></ContactElement>
<ContactElement id="Company_Mobile"></ContactElement>
<ContactElement id="Company_Homepage"></ContactElement>
<ContactElement id="Options_AddressingType"></ContactElement>
<ContactElement id="Options_ShowProviderLayout"></ContactElement>
<ContactElement id="Options_PersonOverFirm"></ContactElement>
<ContactElement id="Options_CountryView"></ContactElement>
<ContactElement id="Options_CountryCodeView"></ContactElement>
<ContactElement id="Options_SalutationView"></ContactElement>
<ContactElement id="Options_SalutationSeparatetLine"></ContactElement>
<ContactElement id="Options_SecondNameView"></ContactElement>
<ContactElement id="Options_PositionView"></ContactElement>
</ContactMapping>
</AddressProvider>
Â
Legacy Configuration (Cloud/Online)
If the connection settings are directly in the AddressProvider
element, then a cloud/online Dynamics (Dynamics 365 Online) is assumed.
This example should not be used, it is only supported for compatibility reasons:
ContactMapping
ContactMapping See XML contact mapping.
PrimeSoft AG, Bahnhofstrasse 4, 8360 Eschlikon, Switzerland