Connect to Dynamics 365 Sales (CRM Online)

TimeXtender can connect and extract data from a Dynamics 365 Sales instance using the CData Dynamics 365 Sales ADO.NET Provider. You may find more information on using this provider from the CData Provider Help Guide here

This guide is broken down into multiple steps:

  1. Create an App Registration in Azure Active Directory
    1. Create the App Registration
    2. Create the App Secret
    3. Add the API Permission
  2. Add the Data Source in TimeXtender
    1. Configure the Data Source Connection

Create an App Registration in Azure Active Directory

For Dynamics 365 to authenticate a connection from an external application, you must first create an App Registration in Azure Active Directory. You can learn more about this process from Microsoft here, however, more direct steps are provided below. 

Create the App Registration

  1. In the Azure Portal, navigate to Azure Active Directory
  2. Select App Registrations in the menu bar on the left & Select New Registration.       
  3. Enter a name and select Accounts in any organizational directory (Multitenant).
  4. Enter a redirect URI, This can be something generic like (http://localhost:33333) or you may use your Organizational URL for your Dynamics instance (https://<company>
  5. Select Register when you are done.
  6. Note down the Application ID which will be used later.

Create the App Secret

  1. After creating the App Registration, select Certificates & secrets.
  2. Select New Client Secret.
  3. Provide a description of the secret, and a duration. When done, select Add. (This key is encrypted after save, so it needs to be documented somewhere safe.)
  4. Note down the Client Secret Value which will be used later.

Add the API Permission

  1. Under the App Registration menu Select API Permissions.
  2. Select Add a permission
  3. Under Microsoft APIs, select Dynamics CRM
  4. Select Delegated permissions, then select user_impersonation, & click Add permissions


The API permission should look like it appears in the red box above.


Add the Data Source in TimeXtender

This data source can be found by navigating to the Dynamics 365 Sales CData provider in the list of availabel CData providers either in the ODX or the Business Unit.

Once you have added the data source configure the connection values as described below

Configure the Data Source Connection

  1. Enter your Organization URL for you Dynamics Instance. This should appear similar to https://<company>
  2. Scroll down to the OAuth section of connection string options and set Initiate OAuth to REFRESH
  3. Set the OAuth Client Id to the Application ID of the App Registration created earlier. 
  4. Set the OAuth Client Secret to the Client Secret of the App Registration created earlier.
  5. Click the Authorize OAuth button. This should launch a web browser and authorize your connection to Dynamics. 
  6. Click the Test Connection button to ensure you have connected successfully. 


Was this article helpful?
1 out of 1 found this helpful


Please sign in to leave a comment.