Skip to main content

Microsoft Dynamics 365 Customer Insights Journeys integration

This guide walks you through connecting Better Email to Microsoft Dynamics 365 Customer Insights - Journeys using an app-only Microsoft Entra setup. Better Email exports the finished email as a draft asset in Dataverse, ready for your team to review and use inside Journeys.

Before you start

To connect Customer Insights - Journeys, you will need:

  • a Customer Insights - Journeys environment with Dataverse access
  • the Dataverse organization URL for that environment
  • permission to create an app registration in Microsoft Entra
  • permission to create an Application User in the Power Platform environment
  • a security role in Dynamics that can create and update marketing email assets
  • an admin user in Better Email who can create and edit integrations

1. Register an app in Microsoft Entra

In Microsoft Entra admin center:

  1. Go to App registrations.
  2. Create a new registration for Better Email.
  3. Choose the tenant you want Better Email to connect to.
  4. Copy the Application (client) ID.
  5. Copy the Directory (tenant) ID.

For this integration, a single-tenant app is usually the simplest choice.

TODO: Add a screenshot of the Entra app registration overview showing the Application (client) ID and Directory (tenant) ID.

2. Create a client secret

Still in the app registration:

  1. Go to Certificates & secrets.
  2. Create a new client secret.
  3. Copy the secret value right away.

Microsoft only shows the secret value once. If you lose it, create a new one and update the Better Email integration.

3. Create an Application User in Dynamics

In Power Platform admin center for the target environment:

  1. Open the environment used by Customer Insights - Journeys.
  2. Go to Settings.
  3. Open Users + permissions.
  4. Open Application users.
  5. Create a new application user based on the app registration you just created.
  6. Assign a role that can create and update marketing email assets in Journeys.

In many setups this is a marketing-focused role such as Marketing Manager - Business, but some teams use a custom role instead.

TODO: Add a screenshot of the Dynamics Application Users screen with the app user form and security role assignment visible.

4. Set up the integration in Better Email

In Better Email:

  1. Go to Integrations.
  2. Create a new integration.
  3. Enter a clear name for the integration.
  4. Choose Microsoft Dynamics 365 Customer Insights Journeys as the type.
  5. Optional: under Access, restrict the integration to specific users or groups.
  6. Enter:
    • Organization URL
    • Tenant ID
    • Client ID
    • Client Secret
    • optional Dataverse API Version if you need something other than v9.2
  7. Enable the integration.
  8. Save the integration.

Better Email handles the token request and refresh flow automatically during export. There is no separate OAuth approval popup in this setup.

You can also optionally configure:

  • Default subject
  • Default preheader

These work the same way as the Salesforce Marketing Cloud integration:

  • If left blank, users can enter the subject and preheader in the export dialog.
  • If you enter plain text, Better Email uses that value as the default during export.
  • If you enter a template-setting reference such as {{ template.subjectline }} or {{ template.preheader }}, Better Email resolves the value from the email's global settings and locks that field in the export dialog.

This is useful when subject lines and preview text should be managed in the email editor instead of being typed manually at export time.

5. Define subject lines and preheaders

By default, users can set the Subject and Preheader in the export dialog when exporting to Customer Insights - Journeys.

If you want those values to come from the email's global settings instead, set the integration defaults to reference the relevant template setting fields.

For example:

  • Default subject: {{ template.subjectline }}
  • Default preheader: {{ template.preheader }}

With this setup:

  1. Subject line and preheader are managed from the email editor instead of being typed manually at export time.
  2. When the export dialog opens, Better Email resolves the configured references from the email settings.
  3. If those settings have values, the export dialog shows the resolved subject line and preheader from the email.
  4. Better Email exports those values to Dynamics as the email subject and preview text.

6. Export behavior

When you export an email to this integration:

  1. Better Email renders the final HTML with merge tags and segmentation output for this provider.
  2. Better Email creates a draft msdynmkt_email record in Dataverse.
  3. On later exports, Better Email updates the same Dataverse email instead of creating a duplicate.

Important to know:

  • Better Email exports the email asset only in v1.
  • Better Email writes the export preheader to the Dynamics preview text field.
  • Better Email does not create journeys, segments, or send schedules in Microsoft Dynamics.
  • The exported asset stays in draft so your Dynamics team can review it before use.

Troubleshooting

If export fails, double-check:

  • the organization URL points to the right Dataverse environment
  • the tenant ID, client ID, and client secret all come from the same Entra app registration
  • the client secret is still active
  • the Application User exists in the target environment
  • the assigned security role can create and update marketing email assets
  • the integration is enabled in Better Email

If the Entra app or secret was rotated recently, updating the credentials in Better Email is the fastest first step.