Connect Jet Analytics to Dynamics CRM with CData
Prerequisites
Before starting the connection:
- Make sure that you have the Dynamics CRM provider downloaded into your project and updated to the latest version. See Managing CData Providers.
- Create an App. See also Steps to Create a Custom OAuth App.
Follow the steps below to connect Dynamics CRM with CData.
Connect to Dynamics CRM with CData
- Sign in to your account through the Azure portal.
- Create your app:
- In the left-hand navigation pane, select Microsoft Entra ID.
- Select App Registrations.
- Click Add.
- Fill out the app registration settings:
- Name: Choose the name of your app.
- Supported account types: Select Any Azure AD Directory - Multi Tenant.
- Redirect URL: Select the provider's default, for example, http://localhost:33333, or you may use your Organizational URL for your Dynamics instance (https://<company>.crm4.dynamics.com/) and set CallbackURL to the exact reply URL you defined.
- Select Register. The app is registered in Azure. Make sure to note down the Application ID.
- Create the OAuth key:
- In the Azure portal, go to the Certificates & Secrets section.
- Create a Client Secret for the app.
- Select a duration.
- Save the key. The value for the key is displayed once. Make sure to note down the key.
- Enter the authentication information in Dynamics CRM and the Jet Data Manager:
- Set OAuthClientSecret to the key value that you have just created.
- Set OAuthClientId to the Application Id of the app that you have created.
- Set up Dynamics CRM
- Select Dynamics CRM > Delegated Permissions > user_impersonation.
- Save your changes.
- Optionally, if you have selected to use permissions that require admin consent (such as the Application Permissions), you can grant them from the current tenant on the API Permissions page.
- Create an application user. You will need to give this user a role that enables them to interact with entities in CRM.
- Go to https://<your-instance>.crm1.dynamics.com/
- Navigate to Settings > Security > Users.
- Set the Application ID from the App Registration step.
- Use the information that you have created above and place them in the fields as shown in the figure below to set up the CData Data Source.
- Click Authorize OAuth. A web browser should open with a success message.
- Click Test Connection to confirm that you have connected successfully.
- Click OK to apply your changes.
Miscellaneous Settings
A common change that needs to be made for Dynamics CRM connections is the default string length (2000). To change this, you can enter 'DefaultColumnSize=8000' into the Other row. Setting the default size to 8000 will cause these fields to become an nvarchar(MAX) data type when you synchronize.