[TIPS] Add connection with online Dynamics 365 in KingswaySoft /SSIS

 [TIPS] Add connection with online Dynamics 365 in KingswaySoft /SSIS

Reference 1 2

First of all, create a new SSIS solution. Then go to Connection Managers section to create New Connection.


new connection

Choose Dynamics CRM in the pop-up window.

Add CRM Connection Manager

The CDS/CRM Connection Manager contains the following four pages which configure how you want to connect to a Dataverse instance or a Microsoft Dynamics 365 CE/CRM server:

  • Generic Service Configuration
  • Proxy Server
  • Advanced Settings
  • More Info

Generic Service Configuration page

The Generic Service Configuration page of the CRM/CDS Connection Manager allows you to specify general settings for the connection.

CRM Connection Manager

Next, we need to create an application in Azure.

  1. Log in to Azure Portal and navigate to Azure Active Directory in the same tenant as your Dynamics 365 instance.

  1. In the left pane, click on “App registrations”, then select “New registration”.

  1. On the Registration page, please ensure that you enter a Redirect URI. For the Redirect URI, you can supply any valid https URL.

  1. After you click Register, you should now see your app in the App registrations page. This is where you get your App ID.  Click on your App to continue on to adding permissions.

  1. In the left Navigation Pane, click on “API Permissions”. If you do not see a permission for Dynamics, click on “Add a permission” and select “Dynamics CRM” from the window that opens.

  1. Next, click on “user_impersonation”.


  1. To create your Client Secret, go to “Certifications & secrets” in the left Navigation Pane, then click on “New client secret”. Add a “Description” and “Expires” timeframe, then click “Add”. 

Please note that Client Secret is available to view and copy only at the time when it is created. If you forget to copy it at time of creation, there is no way to reveal the client secret. In such cases, all you can do is to create a new client secret and you may remove the unrecoverable client secret if you know it is not used elsewhere.

Your App is now created and registered with the required permissions and Client Secret.

Next you will also need to have an Application User created in your Dynamics 365 CE/CRM Environment. To create an Application User:

  1. First, login to the Power Platform Admin Center using the URL https://admin.powerplatform.microsoft.com/.

  2. From within the admin center, try to navigate to the Environment (or instance) that you would like to create the app user.
  3. Click the Settings button on the top.

  4. From within the Settings page, expand the Users + permissions section, and click on the Application user menu item.

  5. In the new page, click the New app user button on top.

  6. In the popup window, click the Add an app button.

  7. Now you should be able to select the app that you have previously created.

  8. After all, you would select the business unit that the user belongs to, and give it a proper security role to complete the creation of the app user.

Your Application User is now created and set up.  You do not need any of the information from the above User forms for the KingswaySoft connection manager, but if you did not have the App User created, you would encounter errors when using the connection.

Now we are ready to create the connection in SSIS

Once you have completed the above steps, you may now head to your SSIS development environment to complete the connection setup. If it is a package with existing connection, you may simply switch your CDS/CRM connection to use OAuth. Or otherwise if your package does not currently have any connection, you may simply create one. As you can see from the screenshot below, we are using all the information gathered above to fill out the connection properties for the OAuth connection.


DEMO:








No comments:

Post a Comment