Connecting to Dynamics 365 Customer Engagement using an OAuth Token

Published: Mar 23, 2021

Connecting to Dynamics 365 Customer Engagement using an OAuth Token

Published: Mar 23, 2021

If your Dynamics 365 Customer Engagement organization is setup to authenticate with OAuth, follow the steps below to setup an OAuth token.

If you’d rather watch a video of how this is completed, click here.

Setting up the application in Azure

  1. Navigate to portal.azure.com
  2. Search for App registrations in the top search bar and select App registrations.
  3. Click New Registration and enter a name for the application.
  4. Choose the appropriate Supported Account Type, most companies will use “Accounts in this organizational directory only”.
  5. For the Redirect URI, choose Web and enter the correct URL found in the SmartConnect connection window.
    • This is specific to your SmartConnect region, so it will vary slightly depending on that.  When setting up an Oauth CRM/CE connection, the redirect URL will be displayed in the connection window.
  6. Click Register.
  7. Click “Certificates & secrets” in the navigation on the left.
  8. Click “New client secret”.
  9. Give the secret a description and choose how long you want the secret to last.  It is important to note that when the secret expires any connections using this secret will no longer connect successfully until a new secret is generated and used in the connection. Make sure to have a process in place for someone to create another secret and update any SmartConnect connections prior to the secret expiring in the future.
  10. Click Add to generate the new secret. Copy and save the Value somewhere as it will not be fully visible again once you navigate away from the Azure Portal.
  11. Click on “API Permission” in the navigation bar on the left.
  12. Click “Add a permission” and choose Dynamics CRM.
  13. Select Delegated permission if it is not already and enable user_impersonation and click Add permissions.
  14. Click on Overview in the navigation bar on the left.
  15. Copy and save the “Application (client) ID” value.
  16. With the Application ID and the Secret Value copied and saved from the application setup, the CRM/CE connection in SmartConnect can now be configured.

Setting up the connector in SmartConnect

  1. Login to login.smartconnect.com if not already.
  2. Navigate to Connections and click the Create Connection button (or edit an existing CE connection).
  3. Select Dynamics 365 Customer Engagement.
  4. Description – enter a friendly description for your connector.
  5. Sever Address – enter the URL for CE excluding the organization name. This will vary depending on which region CE is located in – ie. crm4.dynamics.com, crm.dynamics.com, crm11.dynamics.com, etc.

If using the main “crm.dynamics.com” or the “crm9.dynamics.com” region, also check the option for “Use Regional Discovery Service”

  1. Application (client) Id – enter the same Application Id from the application that was registered in the Azure portal. It can be found on the Overview page in Azure Portal.
  2. Client Secret – enter the Client Secret from the Azure application, if the secret value was not saved when registering the application then a new secret and value will need to be created.
  3. Allow Meta Updates – check this box to enable CE Change and Realtime data soruces.
  4. Allow Advanced Messages – check this box to allow SmartConnect access to the CRM SDK.
  1. Click Validate – this will start the OAuth process and you will be directed to a Microsoft login if not already logged in.  If you were still logged in, you will be asked to grant permissions.  Click accept to grant the permissions.  If your user does not have the proper permissions, you will need to have an admin user grant the permissions.
  2. After successful validating you will be redirected back to the Dynamics 365 Customer Engagement connector and can now choose your organization.
  3. Enable Regional Access – must be clicked to complete the setup.

This step is not required for “crm.dynamics.com” or the “crm9.dynamics.com” regions

  1. After successfully completing the validation and access steps, you can now save the connector.
Content
Setting up the application in Azure Setting up the connector in SmartConnect

Feeling stuck? Get the support and guidance you need to help you power through any data challenge

Reset Filters