How to Connect Microsoft Dynamics 365 to WordPress

Do you want to connect Microsoft Dynamics 365 to WordPress?

MailOptin offers seamless integration with Microsoft Dynamics 365 CRM. You can automatically create and add contacts to a marketing list in Dynamics 365 CRM from your email signup forms or optin forms.

You can follow the step-by-step guide I’ve included below to learn how to connect MailOptin with your Microsoft Dynamics 365 account.

How to Connect MailOptin With Microsoft Dynamics 365

To connect your WordPress site to Microsoft Dynamics 365 via MailOptin, we must create an application in Microsoft Azure Portal.

Creating an App in Azure Portal

Log into Azure Portal with your Microsoft account and click “App Registration”.

Enter a name, select “Accounts in any organizational directory (Any Azure AD directory – Multitenant) and personal Microsoft accounts (e.g., Skype, Xbox)” as Supported Account Types.

Under “Redirect URI”, select “Web” as the platform, and enter https://auth.mailoptin.io/microsoftdynamic/ as the URL.

Click the Register button to create the app.


Go to “API permissions” and click “Add a permission”.


Select “Dynamics CRM” as API permission.

Check “user_impersonation” and save.

Go to “Certificates & Secrets” and click “New secret”. Enter a description and expiry duration and save to generate your app secret value.

The next page would reveal the Secret value. Copy and save it somewhere, as we will be needing it.

We also need the application Client ID. You can get this from the Overview page.

MailOptin Integration with Microsoft Dynamics 365

Go to MailOptin >> Integrations.

MailOptin plugin menu

At the Microsoft Dynamics 365 Connection section, enter the URL of your Dynamics 365 CRM instance as well as the created Client ID and Secret of your app created above.

After saving, click the “Authorize your Account” button.

You will be redirected to a page on Microsoft asking you to log into your account securely and grant MailOptin access to your Dynamics 365 CRM via the app.

And that’s it! Your Microsoft Dynamics 365 account is connected to WordPress.

You can see that we have a success message on the settings page in MailOptin.

Having completed the setup, you can now start capturing leads.

Tags: Dynamics 365