Knowledge Base
Connecting to Dynamics 365 Customer Engagement using an OAuth Token
Browse Common Categories
- Using a Restriction
- Adding a Run Map Task
- Adding an Email Task
- Defining Remaining Options
- Using a Custom Rolling Column
- Using a Translation
- Using a Date Calculation
- Using a Calculation
- Performing the Field Mapping
- Determining Source Grouping
- Defining an Integration Target
- Defining an Integration Source
- Populating the Integration Details
- Using a MultiList Option Lookup
- Using a List Option Lookup
- Using a Multi Lookup
- Using an Entity Lookup
- Using an Activity Party
- Using an Entity Lookup
- Setting up an Integration to Dynamics CRM
- Setting up a Dynamics CRM Connection
- Creating a Dynamics CRM Real-Time Data Source
- Creating a Dynamics CRM Change Data Source
- Using a Relationship
- Creating a Dynamics CRM Bulk Data Source
- Setting up a Dynamics CRM Connection
- Using an Odata Field Lookup
- Creating a Dynamics 365 Business Central Change Data Source
- Creating a Dynamics 365 Business Central Real-time Data Source
- Setting up a Dynamics 365 Business Central Connection
- Connecting to Dynamics 365 Business Central using an OAuth Token
- Using a Page Field Lookup
- Using a Page Key Field Lookup
- Setting up an Integration to Dynamics 365 Business Central
- Creating a Dynamics 365 Business Central Bulk Data Source
- Using an Activity Party
- Using an Entity Lookup
- Connecting to Dynamics 365 Customer Engagement using an OAuth Token
- Using a Relationship
- Using a List Option Lookup
- Using a Multi Lookup
- Setting up an Integration to Dynamics 365 Sales
- Creating a Dynamics 365 Sales Real-Time Data Source
- Creating a Dynamics 365 Sales Change Data Source
- Creating a Dynamics 365 Sales Bulk Data Source
- Setting up a Dynamics 365 Sales Connection
- Using an Entity Reference
- Using a MultiList Option Lookup
- Using an Activity Party
- Using an Entity Lookup
- Setting up an Integration to Dynamics CRM
- Creating a Dynamics CRM Real-Time Data Source
- Creating a Dynamics CRM Change Data Source
- Creating a Dynamics CRM Bulk Data Source
- Setting up a Dynamics CRM Connection
- Using a Relationship
- Using a List Option Lookup
- Using a Multi Lookup
- Using an Entity Reference
Connecting to Dynamics 365 Customer Engagement using an OAuth Token
If your Dynamics 365 Customer Engagement organization is setup to authenticate with OAuth, follow the steps below to setup an OAuth token.
Setting up the application in Azure:
- Navigate to portal.azure.com
- Search for App registrations in the top search bar and select App registrations.
- Click New Registration and enter a name for the application.
- Choose the appropriate Supported Account Type, most companies will use “Accounts in this organizational directory only”.
- 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.
- Click Register.
- Click “Certificates & secrets” in the navigation on the left.
- Click “New client secret”.
- 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.
- 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.
- Click on “API Permission” in the navigation bar on the left.
- Click “Add a permission” and choose Dynamics CRM.
- Select Delegated permission if it is not already and enable user_impersonation and click Add permissions.
- Click on Overview in the navigation bar on the left.
- Copy and save the “Application (client) ID” value.
- 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.
- Login to login.smartconnect.com if not already.
- Navigate to Connections and click the Create Connection button (or edit an existing CE connection).
- Select Dynamics 365 Customer Engagement.
- Enter a description for the connector and check the “Use OAuth to Connect” and “Use Token Authentication” options.
- Note: The “Allow Meta Updates” and “Allow Advanced Messages” options can also be checked, those options refer to enabling additional functionality within integrations using this connection.
- Enter your server address excluding the organization name. This will vary depending on which region CRM/CE is located in – ie. crm4.dynamics.com, crm.dynamics.com, crm11.dynamics.com, etc.
- Note: If using the main “crm” region, or the “crm9” region, also check the option for “Use Regional Discovery Service”. Those regions have a local discovery service that simplifies the connection process.
- 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.
- Enter the Client Secret from the application, if the secret value was not saved when registering the application then a new secret and value will need to be created.
- 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.
- After successful validating you will be redirected back to the Dynamics 365 Customer Engagement connector and can now choose your organization.
- Note: If using the crm or crm9 regions and the “Use Regional Discovery Service” is checked, the connection setup is complete after validating and choosing an organization.
- Once the organization is selected, the “Enable Regional Access” must be clicked to complete the setup.
- Note: The Customer Engagement connector cannot connect to organizations across different regions. If there are organizations across regions, a different instance of the CE connector will need to be setup for each region.
- After successfully completing the validation and access steps, you can now save the connector.
If your Dynamics 365 Customer Engagement organization is setup to authenticate with OAuth, follow the steps below to setup an OAuth token.
Required SC version: 21.1.0.366 or higher
Setting up the application in Azure:
- Navigate to portal.azure.com
- Search for App registrations in the top search bar and select App registrations.
- Click New Registration and enter a name for the application.
- Choose the appropriate Supported Account Type, most companies will use “Accounts in this organizational directory only”.
- For the Redirect URI, choose Web and enter the correct URL found in the SmartConnect connection window.
- When setting up an Oauth CRM/CE connection, the redirect URL will be displayed in the connection window.
- Click Register.
- Click “Certificates & secrets” in the navigation on the left.
- Click “New client secret”.
- 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.
- 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.
- Click on “API Permission” in the navigation bar on the left.
- Click “Add a permission” and choose Dynamics CRM.
- Select Delegated permission if it is not already and enable user_impersonation and click Add permissions.
- Click on Overview in the navigation bar on the left.
- Copy and save the “Application (client) ID” value.
- 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.
- Login to the SmartConnect app if not already.
- Navigate to Connections and click the Create button (or edit an existing CE connection).
- Select Dynamics 365 Customer Engagement.
- Enter a description for the connection.
- For the CRM Server, enter your server address excluding the organization name. This will vary depending on which region CRM/CE is located in – ie. crm4.dynamics.com, crm.dynamics.com, crm11.dynamics.com, etc.
- Check the “Use OAuth 2.0” option.
- Note: If using the main “crm” region, or the “crm9” region, also check the option for “Use Regional Discovery”. Those regions have a local discovery service that simplifies the connection process.
- 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.
- Enter the Client Secret from the application, if the secret value was not saved when registering the application then a new secret and value will need to be created.
- Click Verify. 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.
- Click the “Get Access Token” button to continue the validation process.
- Click the Refresh button to pull a list of organizations and select one of them to continue.
- Note: At this point if you are using the crm or crm9 region with the “Use Regional Discovery” option marked, the setup is complete and you can save and close the window. If using a different region the steps below will need to be followed to complete another OAuth process.
- Click “Verify Organization”. This will start another OAuth process for the organization selected (Microsoft requires authentication at both the discovery and tenant level now) and you will be directed to a Microsoft login if not already logged in. Permissions should already be granted from the steps above so once the page refreshes you can continue within the app.
- Click “Get Organization Token” as the final step to complete the authentication process. The connection window can now be saved and closed.
- Note: The “Allow Meta Updates” and “Allow Advanced Messages” options can also be checked, those options refer to enabling additional functionality within integrations using this connection.
If your Dynamics 365 Customer Engagement organization is setup to authenticate with OAuth, follow the steps below to setup an OAuth token.
Required SC version: 20.18.1.56 or higher
Setting up the application in Azure:
- Navigate to portal.azure.com
- Search for App registrations in the top search bar and select App registrations.
- Click New Registration and enter a name for the application.
- Choose the appropriate Supported Account Type, most companies will use “Accounts in this organizational directory only”.
- For the Redirect URI, choose Web and enter the correct URL based on deployment/region:
- SmartConnect 2018.1.56 – https://loginsmartconnect.azurewebsites.net/oauth/genericrestredirect
- SmartConnect 2018.1.57 – https://loginsmartconnect.azurewebsites.net/oauth/genericrestredirect
- SmartConnect 2018.1.58 – https://login.smartconnect.com/oauth/genericrestredirect
- When setting up an Oauth CRM/CE connection, the redirect URL will be displayed in the connection window.
- Click Register.
- Click “Certificates & secrets” in the navigation on the left.
- Click “New client secret”.
- 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.
- 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.
- Click on “API Permission” in the navigation bar on the left.
- Click “Add a permission” and choose Dynamics CRM.
- Select Delegated permission if it is not already and enable user_impersonation and click Add permissions.
- Click on Overview in the navigation bar on the left.
- Copy and save the “Application (client) ID” value.
- 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.
- Login to the SmartConnect app if not already.
- Navigate to Setup – Setup, and go to the Connector Setup tab.
- Open the “SmartConnect Dynamics CRM Connector”.
- For the CRM Server, enter your server address excluding the organization name. This will vary depending on which region CRM/CE is located in – ie. crm4.dynamics.com, crm.dynamics.com, crm11.dynamics.com, etc.
- Set the Authentication Type to “Microsoft Online Federation”
- Check the “Use OAuth” option.
- Note: If using the main “crm” region, or the “crm9” region, also check the option for “Use Regional Discovery Service”. Those regions have a local discovery service that simplifies the connection process.
- 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.
- Enter the Client Secret from the application, if the secret value was not saved when registering the application then a new secret and value will need to be created.
- Click Verify. 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.
- Click the “Get Access Token” button to continue the validation process.
- Click the Refresh button to pull a list of organizations and select one of them to continue.
- Note: At this point if you are using the crm or crm9 region with the “Use Regional Discovery” option marked, the setup is complete and you can save and close the window. If using a different region the steps below will need to be followed to complete another OAuth process.
- Click “Verify Organization”. This will start another OAuth process for the organization selected (Microsoft requires authentication at both the discovery and tenant level now) and you will be directed to a Microsoft login if not already logged in. Permissions should already be granted from the steps above so once the page refreshes you can continue within the app.
- Click “Get Organization Token” as the final step to complete the authentication process. The connection window can now be saved and closed.
- Note: The other checkbox options can also be marked, those options refer to enabling additional functionality and features within integrations using this connection.
Support