Data Export Service is an add-on that allows replicating CRM Online Data to Azure SQL Database.
The below video by expert Scott Durow is the best resource to learn about it
Below are the steps we need to follow to configure it.
- Go to Settings – Dynamics Marketplace
- Search for Dynamics 365 Export Service
- Click on GET IT NOW
- Click on Agree
- This will install the Data Export Service solution
- Back in CRM – Go to Settings – Data Export. (Pop up window will open up a page for Data Export Authentication, so we need to enable pop up)
- Click on New to create a new Data Export File.
Basically, here we need the Key Vault URL here which stores the database connection string securely.
Clicking on the information icon opens up the dialog box with the below PowerShell script, which needs value for variables like subscription id, key vault name, secret name, tenant id etc.
So as a first step here we need to configure Azure Active Directory (if Office 365 and Azure Tenant are separate)
- Next step is to create Azure SQL database. Search for SQL databases in All Resources and click on Add
- Specify the required information and click Create.
Next we need to create a User that will be used to configure Data Export Service and has appropriate rights in the database
Here the user has been assigned db owner role
For the minimum rights required check the below article
Now let us replace the below placeholders one by one
- Subscription ID –
- Key Vault Name – NishantDemoKeyVault
- Secret Name – DataExport
- Resource Group – DemoRG
- Location – East US
- Connection String –
- Organization ID List –
Tenant Id –
- Get the GUID part – 8e6d9cc0-cd4d-472e-98ab-088b1a6a1233
- Now let us run the PowerShell Script and copy the Connection Key Vault
KeyVault record created in Azure à
- Going back to our Export Profile wizard, we need to paste the Key Vault URL
- Click on Validate
- Select the entity or entities for which profile needs to be created
- Select any relationships
- Next click on Create and Activate
This creates the profile record in CRM
- Once Initial Sync Status shows as completed we can see the tables created in the Azure Database.
The records synchronized –
Let us delete the below selected lead records –
Delete Log table will hold the information of the deleted lead records
To create export profile for a custom entity, (say for e.g. entity named Test in our case)
We need to enable Change Tracking in it.
Get all the details here
Hope this helps..