Dynamics 365 3rd Party OAuth
The following document describes the process of setting up an OAuth entry for Dynamics 365 with Matillion ETL.
1. Log in to https://portal.azure.com
2. On the left-hand side, select Azure Active Directory then App Registrations and click the Add button.
3. In the menu presented, you will need to give it a name, select Web app / API, and set the sign-on URL.
The sign-on URL can be found in the Manage OAuth dialog in Matillion ETL labelled Callback URL.
4. In the Keys section (which is under the Settings section of the registered app), create a key for the app. You can select the option to create a key with a limited duration or one that never expires. Do not give it a value.
5. After the key is saved, a value for the key will be displayed once. Save this value or write it down as this is your Client Secret you will need to enter into Matillion ETL. You will also need to save the value of the Application Id as this is the Client Id.
6. Select Required Permissions and then click Add. Under Select an API, choose Dynamics CRM Online or another Dynamics CRM application you wish to connect to.
7. Once the Dynamics CRM app has been added to the required permissions, select it from the menu and under Delegated Permissions select Access CRM Online as organization users.
8. If your Dynamics 365 edition is ‘Dynamics 365 for Operations’ you will want to do the same but also select Microsoft Dynamics ERP under Select an API and select all delegated permissions from it.
9. Now that is everything set up in Azure and you now need to enter the details into Matillion ETL to set up an OAuth. From your Matillion ETL instance, go to the Manage OAuth Dialog, create a new entry for Dynamics 365 and then go to configure it. These are the details you need to enter:
Client ID: The application id of the app you created in Azure AD.
Client Secret: The value of the key you saved earlier.
Organization URL: https://<subdomain>.operations.dynamics.com
Dynamics365Edition: Dynamics 365 for Operations
10. Click Next, click the link and this will take you to a page where you need to accept the permissions. After doing so you will be redirected back to Matillion ETL and your oauth will be set up. You can now select this oauth entry in the component to authorise queries.