This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Configuring Microsoft Dynamics 365 Web API Operations

To use the Microsoft Dynamics 365 connector, add the <msdynamics365.init> element in your configuration before carrying out any other Microsoft Dynamics 365 Web API operations. For every request to the Microsoft Dynamics 365 Web API, you should have:

  • A Microsoft Dynamics 365 (online) system user account with administrator role for the Microsoft Office 365 subscription
  • A Microsoft Azure subscription for application registration

To get an access token and register a Dynamics 365 app with Azure Active Directory, follow the link https://msdn.microsoft.com/en-us/library/mt622431.aspx.

init
<msdynamics365.init>
    <apiUrl>{$ctx:apiUrl}</apiUrl>
    <accessToken>{$ctx:accessToken}</accessToken>
    <apiVersion>{$ctx:apiVersion}</apiVersion>
    <refreshToken>{$ctx:refreshToken}</refreshToken>
    <clientSecret>{$ctx:clientSecret}</clientSecret>
    <clientId>{$ctx:clientId}</clientId>
    <resource>{$ctx:resource}</resource>
    <registryPath>{$ctx:registryPath}</registryPath>
    <intervalTime>{$ctx:intervalTime}</intervalTime>
</msdynamics365.init>

The elements of the above XML are described below:

  • <apiUrl>: The API URL of Microsoft Dynamics 365 Web API.
  • <accessToken>: The value of the access token to access the Microsoft Dynamics 365 Web API via request.
  • <apiVersion>: The API version of the Microsoft Dynamics 365 (v8.2).
  • <refreshToken>: An OAuth 2.0 refresh token. The application can use this token to acquire other access tokens after the current one is expires.
  • <clientSecret>: The secret key of the application that is registered in the Azure AD.
  • <clientId>: The client ID of the client application that is registered in Azure AD.
  • <resource>: The App ID URI of the web API (E.g., "https://kavi859.crm5.dynamics.com/).
  • <registryPath>: Registry Path of the connector where the values are stored.  If not provided, it defaults to "connectors/msDynamics365".
  • <intervalTime>: The interval time, in milliseconds, to check the accessToken validity. After 60 minutes, the access token becomes invalid. If not provided, the time defaults to 50 minutes.

Now that you have connected to Microsoft Dynamics 365 Web API, use the information in the following topics to perform various operations with the connector.

Find the Microsoft Dynamics CRM documentation at https://msdn.microsoft.com/en-us/library/mt593051.aspx.