Configure Azure Service Bus settings

 

Applies To: Dynamics Marketing

Important

Microsoft Dynamics Marketing has been discontinued and is no longer available. All customer data related to this product has been permanently deleted from all Microsoft servers and is no longer available for extraction. This documentation is being provided for historical purposes only.

The Microsoft Dynamics Marketing Connector for Microsoft Dynamics 365 uses Microsoft Azure as a communication channel and for temporary storage when syncing the two systems. Part of setting up the connector requires that you create the required Azure Service Bus message queues and configure the system to authenticate itself with Azure. This authentication process ensures secure and reliable communication between the two systems.

In this topic

On-page link button Prerequisites

On-page link button** **Decide which queue type to use

On-page link button Set up managed queues for use with Dynamics 365 Online

On-page link button** **Set up custom queues for use with Dynamics 365 online or on-premises

On-page link button Service bus migration

Prerequisites

To access the settings described in this topic, you must have administrator privileges in Microsoft Dynamics Marketing.

To perform the steps described in this topic, you must have already done the following:

When the connector is installed and running, the MDM Listener, Dynamics 365 Listener, and MDM Publisher should all show a value of Running in the Services section of the Integration Options page.

Connector services running

Decide which queue type to use

This topic contains two different procedures, but you only need to use one of them to set up the communication channel for your connector. The procedure you need depends mostly on which version of Dynamics 365 you are running. The table below summarizes the requirements and options; the following text provide more background.

Microsoft Dynamics CRM Online 2016 Update 1 (or newer)

Recommended: Set up managed queues for use with Dynamics 365 Online

Also supported: Set up custom queues for use with Dynamics 365 online or on-premises

Microsoft Dynamics CRM 2016 Service Pack 1 (on-premises) (or newer)

 Set up custom queues for use with Dynamics 365 online or on-premises

When you use managed queues, you don't need an Azure subscription; the required Azure Service Bus is included with your Dynamics Marketing subscription and is maintained by Microsoft. More information: Configure the SDK and Dynamics 365 Connector

Custom queues do require you to have your own Azure subscription, but also provide you with more control and monitoring possibilities. More information:** **Configure the SDK and Dynamics 365 Connector You must use custom queues to connect to Dynamics 365 (on-premises), but you can use either custom or managed queues when connecting to Dynamics 365 (online). If you are integrating with Dynamics 365 (online), we recommend that you use managed queues.

Note

When you use managed queues, the system applies an extra layer of security by regularly rotating out the authentication keys for each of the various services that make up the connector, including the publishers, listeners and Dynamics 365 endpoint. All of the relevant configurations are automatically updated to use the new keys, so no user or administrator actions are necessary for the update to take effect. The system may be down for a very short time while the configuration settings are updated, but most users should not be affected. Admins will be able to see the configuration changes noted in the log.

Set up managed queues for use with Dynamics 365 Online

To set up managed queues for use with Microsoft Dynamics CRM Online 2016 Update 1 (or newer):

  1. Sign in to Dynamics Marketing as an administrator and go to Settings > Administration > Integration Options.

  2. Check the Services section to make sure the connector is enabled and running.

  3. Click the Settings button Dynamics 365 web client Settings button at the top of the Service Bus section to open the Azure Service Bus configuration pop-up window

    Azure Service Bus settings window (SAS, managed)

    Make the following settings here:

    • From the Authentication drop-down list (if shown), choose SAS (other authentication methods, such as ACS, are no longer supported).

    • Select Managed Queues (Recommended).

  4. Click Next to continue to the Provide Credentials for configuring the Azure Service Bus page.

    Azure Service Bus credentials window (SAS, managed)

    Enter the Admin Account and Password for a Dynamics 365 user account with administrator privileges. Dynamics Marketing will use this information to sign in to Dynamics 365 and make the necessary configuration settings; after this, these credentials are not saved.

  5. Click OK to submit your settings. If your connector was already in operation before you changed your Azure Service Bus configuration, then you might now be asked to migrate your queues; if so, see Service bus migration, later in this topic, for more information.

Set up custom queues for use with Dynamics 365 online or on-premises

To set up custom queues:

  1. If you haven't already done so, use the Azure Management Portal to create the Azure Service Bus namespace where you will run message queues for communicating to and from Dynamics 365. Dynamics Marketing will create the queues themselves later in this procedure.

  2. Find the policy name and primary key generated for your Azure Service Bus namespace and paste them into a temporary text file so you can use them later in this procedure. You can find these by checking your Azure Service Bus configuration in the Azure Management Portal or by looking up its connection string, which shows them as values for its SharedAccessKeyName and SharedAccessKey parameters, respectively.

  3. Sign in to Dynamics Marketing as an administrator and go to Settings > Administration > Integration Options.

  4. Check the Services section to make sure the connector is enabled and running.

  5. Click the Settings button Dynamics 365 web client Settings button at the top of the Service Bus section to open the Configure Windows Azure for Microsoft Dynamics Marketing Connector pop-up window.

    Azure Service Bus settings window (SAS, custom)

  6. From the Authentication drop-down list (if shown), choose SAS (other authentication methods, such as ACS, are no longer supported).

  7. In Azure namespace, enter the Azure Service Bus namespace where you want to run your connector queues.

  8. Enter values for Queue from Dynamics 365 and Queue from Dynamics Marketing as follows:

    • If you are integrating with Dynamics 365 (on-premises), then you must enter the queue names that you established when running the configuration wizard (More information:Install the Connector). Dynamics Marketing will create and configure new queues with the names you specify, and these must match the configuration you have already made for Dynamics 365 (on-premises).

    • If you are integrating with Dynamics 365 (online), then enter unique names for each queue. As long as you choose queue names that don't already exist in your specified Azure Service Bus namespace, Dynamics Marketing will create and configure new queues with the names you specify, exactly as required. If you enter existing queue names, then Dynamics Marketing will use the existing queues instead of creating new ones.

      Important

      If you want to use existing queues rather than let Dynamics Marketing create them for you (not recommended), then keep the following important points in mind:

      • Don't use queues that are also used by the SDK service because that will produce many errors, both during sync and SDK operations, and can result in data loss.

      • Your queues must be configured as follows: Recommended max size = 5GB; duplicate detection disabled; sessions disabled; partitioning disabled.

      • Don't set up authentication on the individual queues. Dynamics Marketing authenticates against the Azure Service Bus namespace and expects those credentials to be inherited by the queues it uses.

  9. Click Next to continue to the Provide Credentials for configuration the Azure Service Bus page.

    Azure Service Bus credentials window (ACS, custom)

    Make the following settings:

    • Key name: Paste in the Azure Service Buspolicy name (SharedAccessKeyName) that you copied at the start of this procedure.

    • Key value: Paste in the Azure Service Busprimary key (SharedAccessKey) that you copied at the start of this procedure.

    • Enter the Admin Account and Password for a Dynamics 365 user account with administrator privileges. Dynamics Marketing will use this information to sign in to Dynamics 365 and make the necessary configuration settings; after this, these credentials are not saved.

  10. Click OK to submit your settings. If your connector was already in operation before you changed your Azure Service Bus configuration, then you might now be asked to migrate your queues; if so, see Service bus migration, later in this topic, for more information.

Service bus migration

When you change the service bus namespace and/or queue names for an already working connecter, Dynamics Marketing will ask if you'd like to shift all your data from one set of queues to another through a process called service bus migration. At the end of the process, Dynamics Marketing will also configure your Dynamics 365 system to publish through the new queues. This process is important for preventing the loss of any data that may still be waiting in the old queues.

When you submit updated service bus settings, as described in any of the previous sections of this topic, you will be presented with the following dialog if a service bus migration is appropriate:

Service bus migration in Dynamics Connector

To run the migration, select Migrate (Recommended). Then enter the Management Key for your previous service bus namespace and click OK.

While the migration is running, it temporarily disables all of the buttons on the Integration Settings page until migration is complete.

Site company integration settings

When the migration is completed, the page will automatically return to its normal state.

If you choose to skip migration, then the system will immediately begin using the new queues, but you risk losing any data that may have been waiting in the previous queues.

See Also

Connect Microsoft Dynamics Marketing to Dynamics 365
Connector deployment scenarios
Prepare Dynamics 365 (on-premises) for Azure
Install the Connector
Enable and configure the connector
Install the seller portal for Dynamics 365
Connector entity mapping
Troubleshoot your connector setup
Update the Connector Service and Dynamics 365 Solution
Configure the SDK and Dynamics 365 Connector