Dynamics 365 Sales 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 correct sign-on URL for your instance 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 under the Passwords section for the app by adding a new Description and selecting an Expires option, then click Save. 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.
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.
Be sure to hit Select then Done to save you permissions configuration.
Note: Now, when viewing this App's permissions, both the Dynamics CRM Online and Windows Azure Active Directory APIs should be present.
8. 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
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.If you have any questions about this process or you are having problems recreating the steps shown here, please do not hesitate to Contact Support.