Microsoft Dynamics


Address Provider für Microsoft Dynamics 365 – nutzt die Microsoft Dynamics 365 Web API.

Cloud/Online

Um die Microsoft Dynamics 365 Web API von Dynamics 365 Online zu nutzen, muss bei CloudConnectionSettings das Attribut active auf true gesetzt werden (und bei OnPremiseConnectionSettings auf false).

Für den Betrieb sollten Benutzername und Passwort eines Benutzers hinterlegt werden, welcher die entsprechenden Berechtigungen hat. ManualLogin sollte auf false gesetzt sein.

Bevor der Abruf mit einem Benutzer funktioniert, muss einmalig ein manuelles Login durchgeführt werden. Dafür muss ManualLogin auf true gesetzt werden und der Address Provider muss mit dem Empfängerdialog gestartet werden. Nun erscheint ein Login-Fenster, in dem Benutzername und Passwort eingegeben werden müssen. Sobald dies einmal durchgeführt wurde, funktionieren die Abrufe mit diesem Benutzer anschliessend auch wenn ManualLogin auf false gesetzt ist.

Beispielkonfiguration für Anbindung von Dynamics 365 Online:

<!-- 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///wAAAAAAAAAA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6br7jj1+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 Premises

Um die Microsoft Dynamics 365 Web API von Dynamics 365 On-Premises zu nutzen, muss bei OnPremiseConnectionSettings das Attribut active auf true gesetzt werden (und bei CloudConnectionSettings auf false).

Dabei können die Anfragen mit den Credentials des jeweiligen Benutzers gesendet werden (UseDefaultCredentials ist true) oder es kann ein Benutzer mit Domäne und Passwort für alle Anfragen festgelegt werden:

<UseDefaultCredentials>false</UseDefaultCredentials> <NetworkCredential> <UserName>myUserName</UserName> <Password>myPassword</Password> <Domain>myDomain</Domain> </NetworkCredential>

Beispielkonfiguration für Anbindung von Dynamics 365 On-Premises:

<!-- 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>iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAgUAEhUQMiUg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DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTczbp9jAAAAeklEQVQoU42K1w6CUBAFj2Lv3Yu9AaLYWOD8/5+ZG1YSX4zzcnYmi78Z6xZsdD9UX0B9pGKZCbA0KpaLoCkG0576hFL2aeZpP/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>

 

Veraltete Konfiguration (Cloud/Online)

Wenn sich die Connection Settings direkt im AddressProvider-Element befinden, dann wird von einem Cloud/Online-Dynamics (Dynamics 365 Online) ausgegangen.

Dieses Beispiel sollte nicht verwendet werden, es wird nur aus Kompatibilitätsgründen unterstützt:


ContactMapping

PrimeSoft AG, Bahnhofstrasse 4, 8360 Eschlikon, Switzerland