Microsoft Dynamics OData configuration

Version Article link
AEM 6.5 Click here
AEM as a Cloud Service This article

data-integeration

Microsoft Dynamics is a Customer Relationship Management (CRM) and Enterprise Resource Planning (ERP) software that provides enterprise solutions for creating and managing customer accounts, contacts, leads, opportunities, and cases. Experience Manager Forms Data Integration provides an OData cloud service configuration to integrate Forms with both online and on-premises Microsoft Dynamics server. It enables you to create Form Data Model based on the entities, attributes, and services defined in Microsoft Dynamics service. The Form Data Model can be used to create Adaptive Forms that interact with Microsoft Dynamics server to enable business workflows. For example:

  • Query Microsoft Dynamics server for data and prepopulate Adaptive Forms
  • Write data into Microsoft Dynamics on Adaptive Form submission
  • Write data in Microsoft Dynamics through custom entities defined in Form Data Model and vice versa
MS Dynamics OData Cloud Service (OData Service) is available with all run modes. For more information on configuring run modes for an Experience Manager instance, see [Run Modes](/docs/experience-manager-cloud-service/implementing/deploying/overview.html?lang=en#runmodes).

Prerequisites

Before you begin to set up and configure Microsoft Dynamics, ensure that you have:

Set Reply URL for registered Microsoft Dynamics application

Do the following to set the Reply URL for registered Microsoft Dynamics application:

NOTE

Use this procedure only while integrating Experience Manager Forms with online Microsoft Dynamics server.

  1. Go to Microsoft Azure Active Directory account and add the following cloud service configuration URL in Reply URLs settings for your registered application:

    https://[server]:[port]/libs/fd/fdm/gui/components/admin/fdmcloudservice/createcloudconfigwizard/cloudservices.html

    Azure directory

  2. Save the configuration.

Configure Microsoft Dynamics for IFD

Microsoft Dynamics uses claims-based authentication to provide access to data on Microsoft Dynamics CRM server to external users. To enable this, do the following to configure Microsoft Dynamics for Internet-facing deployment (IFD) and configure claim settings.

NOTE

Use this procedure only while integrating Experience Manager Forms with on-premises Microsoft Dynamics server.

  1. Configure Microsoft Dynamics on-premises instance for IFD as described in Configure IFD for Microsoft Dynamics.

  2. Run the following commands using Windows PowerShell to configure claim settings on IFD-enabled Microsoft Dynamics:

    Add-PSSnapin Microsoft.Crm.PowerShell
     $ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
     $ClaimsSettings.Enabled = $true
     Set-CrmSetting -Setting $ClaimsSettings
    

    See App registration for CRM on-premises (IFD) for details.

Configure OAuth client on AD FS machine

Do the following to register an OAuth client on Active Directory Federation Services (AD FS) machine and grant access on AD FS machine:

NOTE

Use this procedure only while integrating Experience Manager Forms with on-premises Microsoft Dynamics server.

  1. Run the following command:

    Add-AdfsClient -ClientId “<Client-ID>” -Name "<name>" -RedirectUri "<redirect-uri>" -GenerateClientSecret

    Where:

    • Client-ID is a client ID you can generate using any GUID generator.
    • redirect-uri is the URL to the Microsoft Dynamics OData cloud service on Experience Manager Forms. The default cloud service installed with the Experience Manager Forms is deployed at the following URL:
      https://'[server]:[port]'/libs/fd/fdm/gui/components/admin/fdmcloudservice/createcloudconfigwizard/cloudservices.html
  2. Run the following command to grant access on AD FS machine:

    Grant-AdfsApplicationPermission -ClientRoleIdentifier “<Client-ID>” -ServerRoleIdentifier <resource> -ScopeNames openid

    Where:

    • resource is the Microsoft Dynamics organization URL.
  3. Microsoft Dynamics uses HTTPS protocol. To invoke AD FS endpoints from Forms server, install Microsoft Dynamics site certificate to Java certificate store using the keytool command on the computer running Experience Manager Forms.

Configure cloud service for your Microsoft Dynamics service

An OData service is identified by its service root URL. To configure an OData service in Experience Manager as a Cloud Service, ensure that you have service root URL for the service, and do the following:

NOTE

For step-by-step guide to configure Microsoft Dynamics 365, online or on-premises, see Microsoft Dynamics OData Configuration.

  1. Go to Tools > Cloud Services > Data Sources. Tap to select the folder where you want to create a cloud configuration.

    See Configure folder for cloud service configurations for information about creating and configuring a folder for cloud service configurations.

  2. Tap Create to open the Create Data Source Configuration wizard. Specify a name and optionally a title for the configuration, select OData Service from the Service Type drop-down, optionally browse and select a thumbnail image for the configuration, and tap Next.
    In the Authentication Settings tab:

    1. Enter the value for the Service Root field. Go to the Dynamics instance and navigate to Developer Resources to view the value for the Service Root field. For example, https://<tenant-name>/api/data/v9.1/

    2. Select OAuth 2.0 as the authentication type.

    3. Replace the default values in the Client Id (also referred to as Application ID), Client Secret, OAuth URL, Refresh Token URL, Access Token URL, and Resource fields with values from your Microsoft Dynamics service configuration. It is mandatory to specify the dynamics instance URL in the Resource field to configure Microsoft Dynamics with a form data model. Use the Service Root URL to derive the dynamics instance URL. For example, https://org.crm.dynamics.com.

    4. Specify openid in the Authorization Scope field for authorization process on Microsoft Dynamics.

      Authentication Settings
      Form Data Model

  3. Click Connect to OAuth. You are redirected to Microsoft Dynamics login page.

  4. Log in with your Microsoft Dynamics credentials and accept to allow the cloud service configuration to connect to Microsoft Dynamics service. It is a one-time task to establi Form Data Model ween the cloud service and the service.

    You are the Form Data Model he cloud service configuration page, which displays a message that OData configuration is successfully saved.

The MS Dynamics OData Cloud Service (OData Service) cloud service is configured and connected with your Dynamics service. Form Data Model Form Data Model

Create Form Data Model

After configuring MS Dynamics OData Cloud Ser Form Data Model ce) cloud service, you can use the service while creating form data models. For more information, see Create form data model.

Next, you can create an Adaptive Form based o Form Data Model odel and use it in various Adaptive Form use cases, such as:

  • Prefill Adaptive Form by querying information from Microsoft Dynamics entities and services
  • Invoke Microsoft Dynamics server operations defined in a Form Data Model using Adaptive Form rules
  • Write submitted form data to Microsoft Dynamics entities

For more information about creating and using Form Data Model in business workflows, see Data Integration.

On this page