Microsoft Dynamics OData configuration microsoft-dynamics-odata-configuration
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 (FDM) based on the entities, attributes, and services defined in Microsoft Dynamics service. The Form Data Model (FDM) 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 (FDM) and conversely
AEM as a Cloud Service offers various out of the box submit actions for handling form submissions. You can learn more about these options in the Adaptive Form Submit Action article.
Prerequisites prerequisites
Before you begin to set up and configure Microsoft Dynamics, ensure that you have:
-
Configured Microsoft Dynamics 365 online or installed an instance of one of the following Microsoft Dynamics versions:
- Microsoft Dynamics 365 on-premises
- Microsoft Dynamics 2016 on-premises
-
. Take a note of the values for the client ID (also referred to as application ID) and client secret for the registered service. These values are used while configuring cloud service for your Microsoft Dynamics service.
Set Reply URL for registered Microsoft Dynamics application set-reply-url-for-registered-microsoft-dynamics-application
Do the following to set the Reply URL for registered Microsoft Dynamics application:
-
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
-
Save the configuration.
Configure Microsoft Dynamics for IFD 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.
-
Configure Microsoft Dynamics on-premises instance for IFD as described in .
-
Run the following commands using Windows PowerShell to configure claim settings on IFD-enabled Microsoft Dynamics:
code language-shell Add-PSSnapin Microsoft.Crm.PowerShell $ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings $ClaimsSettings.Enabled = $true Set-CrmSetting -Setting $ClaimsSettings
See for details.
Configure OAuth client on AD FS machine 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:
-
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
-
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.
-
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 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:
-
Go to Tools > Cloud Services > Data Sources. Select 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.
-
Select 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 select Next.
In the Authentication Settings tab:-
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/
-
Select OAuth 2.0 as the authentication type.
-
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 (FDM). Use the Service Root URL to derive the dynamics instance URL. For example, .
-
Specify openid in the Authorization Scope field for authorization process on Microsoft Dynamics.
Form Data Model (FDM)
-
-
Click Connect to OAuth. You are redirected to Microsoft Dynamics login page.
-
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 establish Form Data Model (FDM) 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 (FDM)
Create Form Data Model (FDM) create-form-data-model
After configuring MS Dynamics OData cloud service, you can use the service while creating form data model (FDM). For more information, see Create form data model (FDM).
Next, you can create an Adaptive Form based Form Data Model (FDM) 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 (FDM) using Adaptive Form rules
- Write submitted form data to Microsoft Dynamics entities
You can configure the Form Data Model Submit Action for an Adaptive Form to send data to Microsoft Dynamics OData.
For more information about creating and using Form Data Model (FDM) in business workflows, see Data Integration.
Related Articles
- Send email
- Submit to SharePoint
- Submit using Form Data Model
- Submit to Azure Blob Storage
- Submit to REST endpoint
- Submit to OneDrive
- Invoke an AEM Workflow
- Submit to Power Automate
- Submit to Workfront Fusion
- Connect Adaptive Form to Salesforce application
- Connect an Adaptive Form to Microsoft® Dynamics OData
- Connect an Adaptive Form to ۶Ƶ Marketo Engage
- Create custom submit action