Skip to content

Dynamics 365 Sales Query authentication guide

This is a step-by-step guide to acquiring credentials for authorizing the Dynamics 365 Sales Query component for use in Matillion ETL.

  • The Dynamics 365 Sales Query connector uses OAuth entry for third-party authentication.
  • While connector properties may differ between cloud data warehouses, the authentication process remains the same.
  • Most third-party apps and services that connect to Microsoft data can be set up for use in Matillion ETL through the Microsoft Azure Portal using much of the same process.

Prerequisites

Begin by creating an OAuth entry in Matillion ETL, as described in Manage OAuth. You should then configure this OAuth entry using the Dynamics 365 Sales credentials, obtained as described below.

Follow the steps in Acquiring Azure credentials to access the Azure portal and create credentials. Then continue as per the instructions below.


Configure Dynamics CRM API

  1. In the Request API permissions panel, click Dynamics CRM in the list of Microsoft APIs.
  2. This will open the Dynamics CRM panel. Select Delegated permissions, and then select user_impersonation Access as the signed-in user. Then click Add permissions.
  3. Click Expose an API in the menu on the left.
  4. Before a scope can be added, an Application ID URI will need to be set. The application ID URI is a URI that uniquely identifies the application in your Azure Active Directory. Click Set to the right of the Application ID URI field and replace the suggested URI with your preferred URI to be associated with the app, then click Save.
  5. Click + Add a scope. The Add a scope panel will appear on the right. Provide details for the following required fields:
  6. Scope name: A display name for the scope when access to the API is requested. Best practice dictates using a <resource.operation.consent> name structure.
  7. Who can consent? Select which users can consent to this scope in directories where user consent is enabled: Admins and users, or Admins only.
  8. Admin consent display name: A name for the scope to be displayed on admin consent pages.
  9. Admin consent description: A detailed description for the scope, to be displayed on admin consent pages.
  10. User consent display name: A name for the scope to be displayed on user consent screens.
  11. User consent description: A detailed description for the scope to be displayed on user consent screens.
  12. Click Add scope.
  13. Next, navigate to the Office 365 Home page, giving your sign-in credentials if requested. Click the Business Apps tab at the top. Click the Dynamics 365 - custom app. This will open a Dynamics 365 dashboard. The page's URL will contain your Dynamics 365 account URL, which is required in authorizing for use in Matillion ETL. Copy everything before and including dynamics.com. For example, if the URL is https://companyname.crm11.dynamics.com/main.aspx#414717258, you will need https://companyname.crm11.dynamics.com.
  14. Return to the Manage OAuth dialog in Matillion ETL to complete the OAuth configuration.