# mulesoft Microsoft Dynamics 365 For Finance and Operations Connector - Full Documentation --- product: Microsoft Dynamics 365 For Finance and Operations Connector version: 3.1 is-latest-version: true --- # Microsoft Dynamics 365 for Finance and Operations Connector 3.1 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Microsoft Dynamics 365 for Finance and Operations (Microsoft Dynamics 365 for Finance and Operations Connector) enables integration with Microsoft Dynamics 365 for Operations Web API. ## Before You Begin To use this connector, you must be familiar with: - The Microsoft Dynamics 365 for Finance and Operations API - Anypoint Connectors - Mule runtime engine (Mule) - Elements in a Mule flow - Global elements - How to create a Mule app using Anypoint Studio Before creating an app, you must have access to a Microsoft Dynamics 365 instance (online or on-premises) managed by Azure Active Directory. ## Common Use Cases for the Connector This connector enables you to perform these operations: - Authorize or unauthorize access to a Microsoft Dynamics 365 for Finance and Operations server - Create a recurring job on Microsoft Dynamics 365 for Finance and Operations server - Retrieve multiple entries, including retrieval using DataSense Query Language - Execute operations See [Examples](https://docs.mulesoft.com/microsoft-365-ops-connector/latest/microsoft-365-finance-operations-connector-examples) for use cases. ## Audience - New users, read: - [Using Anypoint Studio to Configure the Connector](https://docs.mulesoft.com/microsoft-365-ops-connector/latest/microsoft-365-finance-operations-connector-studio) to create your Mule app - [Examples](https://docs.mulesoft.com/microsoft-365-ops-connector/latest/microsoft-365-finance-operations-connector-examples), which provides an example use case for the connector - Advanced users, read: - [XML and Maven Support](https://docs.mulesoft.com/microsoft-365-ops-connector/latest/microsoft-365-finance-operations-connector-xml-maven) - The [Examples](https://docs.mulesoft.com/microsoft-365-ops-connector/latest/microsoft-365-finance-operations-connector-examples), which provide one or more use cases for the connector ## Authentication Types Microsoft Dynamics 365 for Finance and Operations Connector uses the OAuth 2.0 authentication connection type, which delegates user authentication to the service hosting the user account. ## Next Step After you complete the prerequisites and experiment with templates and examples, you are ready to create an app and configure the connector using [Anypoint Studio](https://docs.mulesoft.com/microsoft-365-ops-connector/latest/microsoft-365-finance-operations-connector-studio). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Microsoft Dynamics 365 for Finance and Operations Connector Reference](https://docs.mulesoft.com/microsoft-365-ops-connector/latest/microsoft-365-ops-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Microsoft Dynamics 365 For Finance and Operations Connector version: 3.1 is-latest-version: true --- # Microsoft Dynamics 365 for Finance and Operations Connector 3.1 - Example > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The following example illustrates how to work with the features of Anypoint Connector for Microsoft Dynamics 365 for Finance and Operations (Microsoft Dynamics 365 for Finance and Operations Connector) using the **Retrieve Multiple** operation to accept data and then output the results in JSON format. This example uses the following operations in the flow: 1. **HTTP Listener** Accepts data from HTTP requests 2. **Microsoft Dynamics 365 for Operations Retrieve multiple** Connects and executes a query to retrieve all the customer entities 3. **Transform Message** Outputs the results of the **Retrieve Multiple** operation in JSON format. The following screenshot shows the Studio app flow for this example: ![Microsoft Dynamics 365 for Operations Use Case Flow](/mulesoft/current/en-us/microsoft-365-ops-connector/latest/_images/microsoft-365-ops-studio-use-case.png) Figure 1. Microsoft Dynamics 365 for Operations Use Case Flow Use a properties file to define these attributes for use in the flow: - `username="${operations.username}"` - `password="${operations.password}"` - `resource="${operations.resource}"` - `clientId="${operations.client_id}"` - `clientSecret="${operations.client_secret}"` - `tokenRequestEndpoint="${operations.request_endpoint}"` You can paste this XML code into Anypoint Studio to experiment with the flow: ```xml ``` ## See Also [Salesforce Help](https://help.salesforce.com) --- product: Microsoft Dynamics 365 For Finance and Operations Connector version: 3.1 is-latest-version: true --- # Microsoft Dynamics 365 for Finance and Operations Connector 3.1 - XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio. When you install the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location. It also adds a dependency to the `pom.xml` file. If you manually code a Mule runtime engine (Mule) app in XML either from the Anypoint Studio XML editor or from a text editor, you can get access to the connector in your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `mule` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/microsoft-365-for-operations http://www.mulesoft.org/schema/mule/microsoft-365-for-operations/current/mule-microsoft-365-for-operations.xsd ``` This example shows how the namespace statements are placed in the XML: ```xml ``` ## Add a POM File Dependency The `pom.xml` Apache Maven file generated by Anypoint Studio contains dependencies for a Mule app. When you code a Mule app manually, include this XML snippet in your POM file to enable access to this connector: ```xml com.mulesoft.connectors mule-microsoft-dynamics365-for-operations-connector x.x.x mule-plugin ``` Replace `x.x.x` with the version that corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `dynamics finance`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## Next Step After completing your namespace and `pom.xml` file, you can try the [Examples](https://docs.mulesoft.com/microsoft-365-ops-connector/latest/microsoft-365-finance-operations-connector-examples). ## See Also [Salesforce Help](https://help.salesforce.com) --- product: Microsoft Dynamics 365 For Finance and Operations Connector version: 3.1 is-latest-version: true --- # Microsoft Dynamics 365 for Finance and Operations Connector 3.1 Additional Configuration Information > For the full documentation index, see: https://docs.mulesoft.com/llms.txt In Microsoft Dynamics 365 for Finance and Operations Connector 3.1.7 and later, you can use custom logic to configure properties of complex types when creating entities. ## Configure Complex Types with Custom Logic In Microsoft Dynamics 365 for Finance and Operations Connector 3.1.6 and earlier, suppose you use the following payload in the **Create** operation: ```json %dw 2.0 output application/java --- { "Name": "GENERIC-CUSTOMER-NAME", "CustomerAccount": "CUSTOMER-ACCOUNT", "SalesCurrencyCode": "EUR", "CustomerGroupId": "GROUP-ID", "IsServiceDeliveryAddressBased": "No" } ``` `IsServiceDeliveryAddressBased` is a property of the `Microsoft.Dynamics.DataEntities.NoYes` type, which is an enum type in the Microsoft data model. Using this payload in the **Create** operation throws an exception because the value for `IsServiceDeliveryAddressBased` is `No`, which is a string instead of an enum type. In Microsoft Dynamics 365 for Finance and Operations Connector 3.1.7 and later, use the newly added custom logic to properly configure the property and avoid exceptions: ```json %dw 2.0 output application/java --- { "Name": "GENERIC-CUSTOMER-NAME", "CustomerAccount": "CUSTOMER-ACCOUNT", "SalesCurrencyCode": "EUR", "CustomerGroupId": "GROUP-ID", "IsServiceDeliveryAddressBased": { "muleAdditions": { "kind": "enum", "type": "Microsoft.Dynamics.DataEntities.NoYes" }, "value" : "No" } } ``` The value for `IsServiceDeliveryAddressBased` must be an object type that contains the following fields: - `muleAdditions` - `kind` Key that indicates the kind of complex object. The only supported value is `enum`. - `type` Key that indicates the type in the Microsoft data model. Supported values are any enum type in the Microsoft data model. To find out the enum type: - In Microsoft Dynamics 365 for Finance and Operations Connector 3.1.7 and later, the improved metadata now shows the complete name of a data type. ![List of metadata that shows the complete naming of the data type](/mulesoft/current/en-us/microsoft-365-ops-connector/latest/_images/enum.png) - Execute a GET request on `https://{tenant}.com/data/$metadata`. The resulting XML file contains the entire data model. - `value` Key with the enum value as a string. ## Next Step After you complete configuring the connector, you can try the [Examples](https://docs.mulesoft.com/microsoft-365-ops-connector/latest/microsoft-365-finance-operations-connector-examples). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Microsoft Dynamics 365 For Finance and Operations Connector version: 3.1 is-latest-version: true --- # Microsoft Dynamics 365 For Operations Connector 3.1 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Microsoft Dynamics 365 for Finance and Operations (Microsoft Dynamics 365 for Operations Connector) enables integration with Microsoft Dynamics 365 for Operations Web API. ## Microsoft Dynamics 365 For Operations Configurations ### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types to provide for this configuration.

x

Name

String

The identifier of this element, by which other components reference it.

x

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the instance expires at the exact moment that it becomes eligible. Mule purges the instances as appropriate.

## Connection Types ### OAuth Client Credentials Use OAuth 2.0 to delegate user authentication to the service hosting the user account. For more information, refer to [Configuring OAuth 2.0 for Connectors](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2), [Configuring OAuth 2.0 for Connectors on CloudHub](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2-cloudhub), or [OAuth Support in the SDK](https://docs.mulesoft.com/mule-sdk/latest/oauth). #### Parameters
NameTypeDescriptionDefault ValueRequired

Resource

String

App ID URI of the web API.

x

TLS configuration

Defines a configuration for TLS, which can be used from both the client and server sides to secure communication for the Mule app. When using the HTTPS protocol, the HTTP communication is secured using TLS or SSL. If HTTPS is configured as the protocol, then, at a minimum, the user must configure the keystore in the tls:context child element of the listener-config.

Read Timeout

Number

Specifies the amount of time, in milliseconds, that the consumer will wait for a response before it times out. Default value is 0, which means infinite.

0

Read Timeout Time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit to use for the Read Timeout parameter.

SECONDS

Host

String

Hostname of the proxy if a proxy is used. If this property is not set, then no proxy is used.

Port

Number

Port number of the proxy. If the Host value is specified, this property is required and cannot be a negative number.

Username

String

If a proxy is used, this is the username used to authenticate against the proxy. If this property is not set, then no authentication is used against the proxy.

Password

String

Password used to authenticate against the proxy.

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Client Id

String

OAuth client ID as registered with the service provider.

x

Client Secret

String

OAuth client secret as registered with the service provider.

x

Token Url

String

The service provider’s token endpoint URL

https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token

Scopes

String

OAuth scopes to request during the OAuth dance. If not provided, this defaults to the scopes specified in the annotation.

Object Store

String

A reference to the object store to use to store each resource owner ID’s data. If not specified, Mule automatically provisions the default object store.

### OAuth 2.0 Use OAuth 2.0 to delegate user authentication to the service hosting the user account. For more information, refer to [Configuring OAuth 2.0 for Connectors](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2), [Configuring OAuth 2.0 for Connectors on CloudHub](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2-cloudhub), or [OAuth Support in the SDK](https://docs.mulesoft.com/mule-sdk/latest/oauth). #### Parameters
NameTypeDescriptionDefault ValueRequired

Scope

String

OpenID Connect scope.

openid

Resource

String

OAuth endpoint URL.

x

Response Type

String

Tells the authorization server what parameters to return from the authorization endpoint.

query

TLS configuration

Defines a configuration for TLS, which can be used from both the client and server sides to secure communication for the Mule app. When using the HTTPS protocol, the HTTP communication is secured using TLS or SSL. If HTTPS is configured as the protocol, then, at a minimum, the user must configure the keystore in the tls:context child element of the listener-config.

Read Timeout

Number

Specifies the amount of time in milliseconds that the consumer waits for a response before it times out. Default value is 0, which means infinite.

0

Read Timeout Time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit to use for the Connection Timeout and Read Timeout parameters.

SECONDS

Host

String

Hostname of the proxy if a proxy is used. If this property is not set, then no proxy is used.

Port

Number

Port number of the proxy. If the Host value is specified, this property is required and cannot be a negative number.

Username

String

Username used to authenticate against the proxy. If this property is not set, then no authentication is used against the proxy.

Password

String

Password used to authenticate against the proxy.

Reconnection

When the app is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Consumer Key

String

OAuth consumer key as registered with the service provider.

x

Consumer Secret

String

OAuth consumer secret as registered with the service provider.

x

Authorization Url

String

Service provider’s authorization endpoint URL.

https://login.microsoftonline.com/{tenant}/oauth2/authorize

Access Token Url

String

Service provider’s access token endpoint URL.

https://login.microsoftonline.com/{tenant}/oauth2/token

Scopes

String

OAuth scopes to request during the OAuth dance. If not provided, it defaults to the scopes provided in the annotation.

Resource Owner Id

String

Resource Owner ID that each component uses if a reference is not otherwise provided.

Before

String

Name of the flow to execute before starting the OAuth dance.

After

String

Name of the flow to execute immediately after an access token is received.

Listener Config

String

A reference to a <http:listener-config /> to use to create the listener for the access token callback endpoint.

x

Callback Path

String

Path of the access token callback endpoint.

x

Authorize Path

String

Path of the local HTTP endpoint that triggers the OAuth dance.

x

External Callback Url

String

If the callback endpoint is behind a proxy or accessible through a non direct URL, use this parameter to specify the URL the OAuth provider should use to access the callback.

Object Store

String

A reference to the object store to use to store each resource owner ID’s data. If not specified, Mule automatically provisions the default object store.

##### OAuth Username Password (Deprecated) ###### Parameters
NameTypeDescriptionDefault ValueRequired

TLS configuration

Defines a configuration for TLS, which can be used from both the client and server sides to secure communication for the Mule app. When using the HTTPS protocol, the HTTP communication is secured using TLS or SSL. If HTTPS is configured as the protocol, then, at a minimum, the user must configure the keystore in the tls:context child element of the listener-config.

Read Timeout

Number

Specifies the amount of time, in milliseconds, that the consumer will wait for a response before it times out. Default value is 0, which means infinite.

0

Read Timeout Time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit to be used for the Read Timeout parameter

SECONDS

Host

String

Hostname of the proxy. If this property is not set then no proxy will be used, otherwise a proxy will be used, but a proxy host must be specified.

Port

Number

Port of the proxy. If host is set then this property must be set and cannot be a negative number.

Username

String

Username used to authenticate against the proxy. If this property is not set then no authentication is going to be used against the proxy, otherwise this value must be specified.

Password

String

Password used to authenticate against the proxy.

Username

String

Username used to initialize the session

x

Password

String

Password used to authenticate the user

x

Resource

String

The App ID URI of the web API (secured resource).

x

Client Id

String

The Application Id assigned to your app when you registered it with Azure AD. You can find this in the Azure Portal. Click Active Directory, click the directory, choose the application, and click Configure.

x

Client Secret

String

The Application Secret that you created in the app registration portal for your app. It should not be used in a native app, because client_secrets cannot be reliably stored on devices. It is required for web apps and web APIs, which have the ability to store the client_secret securely on the server side.

x

Token Request Endpoint

String

The endpoint where the authorization request should be sent.

x

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment will fail if the test doesn’t pass after exhausting the associated reconnection strategy

Connection Timeout

Number

Specifies the amount of time, in milliseconds, that the consumer will attempt to establish a connection before it times out. Default value is 0, which means infinite.

0

Connection Timeout Time unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit to be used for the Connection parameter

SECONDS

## Associated Operations - [Acknowledge Export From Recurring Job](#AcknowledgeExportFromRecurringJob) - [Create](#Create) - [Dequeue Recurring Job](#DequeueRecurringJob) - [Execute Operation](#executeOperation) - [Export Data From Recurring Job](#ExportDataFromRecurringJob) - [Import Data Recurring Job](#importDataRecurringJob) - [Retrieve Multiple](#retrieveMultiple) - [Retrieve Multiple By Query](#retrieveMultipleByQuery) - [Unauthorize](#unauthorize) ### Acknowledge Export From Recurring Job `` Performs the acknowledgment action for the downloaded data package from a recurring job, as described in [this link](https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/recurring-integrations). #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Dequeue Recurring Job Response

Any

InputStream containing the required JSON text that has the response of the dequeue recurring job operation.

#[payload]

Activity Id

String

Activity ID.

x

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

Reconnection Strategy

Retry strategy in case of connectivity errors.

#### For Configurations - [Microsoft Dynamics 365 For Operations Configurations](#Dynamics365ForOperations) #### Throws - DYNAMICS365FOROPERATIONS:CONNECTIVITY - DYNAMICS365FOROPERATIONS:INVALID\_CONNECTION - DYNAMICS365FOROPERATIONS:INVALID\_CREDENTIALS - DYNAMICS365FOROPERATIONS:INVALID\_INPUT - DYNAMICS365FOROPERATIONS:LOGIN\_FAILED - DYNAMICS365FOROPERATIONS:NOT\_FOUND - DYNAMICS365FOROPERATIONS:RETRY\_EXHAUSTED - DYNAMICS365FOROPERATIONS:TIMEOUT ### Create `` Creates a new entity. Refer to [this link](https://docs.mulesoft.com/microsoft-365-ops-connector/latest/%3Chttps://learn.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/gg328090(v=crm.8)?redirectedfrom=MSDN>) for creating an entity and [this link](https://docs.mulesoft.com/microsoft-365-ops-connector/latest/%3Chttps://learn.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/mt607875(v=crm.8)?redirectedfrom=MSDN>) for associating an entity upon creation. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Logical Name

String

Logical name of the entity. It is always the schema name in lower case.

x

Attributes

Object

Attributes of the entity created as a map.

#[payload]

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

Streaming Strategy

  • RepeatableInMemoryStream

  • RepeatableFileStoreStream

  • non-repeatable-stream

Configures how Mule processes streams. The default is to use repeatable streams.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

#### Output

Type

Binary

Attributes Type

Binary

#### For Configurations - [Microsoft Dynamics 365 For Operations Configurations](#Dynamics365ForOperations) #### Throws - DYNAMICS365FOROPERATIONS:CONNECTIVITY - DYNAMICS365FOROPERATIONS:INVALID\_CONNECTION - DYNAMICS365FOROPERATIONS:INVALID\_CREDENTIALS - DYNAMICS365FOROPERATIONS:INVALID\_INPUT - DYNAMICS365FOROPERATIONS:LOGIN\_FAILED - DYNAMICS365FOROPERATIONS:NOT\_FOUND - DYNAMICS365FOROPERATIONS:RETRY\_EXHAUSTED - DYNAMICS365FOROPERATIONS:TIMEOUT ### Dequeue Recurring Job `` Performs the dequeue action for the activity specified, as described in [this link](https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/recurring-integrations). #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Activity Id

String

Activity ID.

x

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

Streaming Strategy

  • RepeatableInMemoryStream

  • RepeatableFileStoreStream

  • non-repeatable-stream

Configures how Mule processes streams. The default is to use repeatable streams.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

#### Output

Type

Any

Attributes Type

Binary

#### For Configurations - [Microsoft Dynamics 365 For Operations Configurations](#Dynamics365ForOperations) #### Throws - DYNAMICS365FOROPERATIONS:CONNECTIVITY - DYNAMICS365FOROPERATIONS:INVALID\_CONNECTION - DYNAMICS365FOROPERATIONS:INVALID\_CREDENTIALS - DYNAMICS365FOROPERATIONS:INVALID\_INPUT - DYNAMICS365FOROPERATIONS:LOGIN\_FAILED - DYNAMICS365FOROPERATIONS:NOT\_FOUND - DYNAMICS365FOROPERATIONS:RETRY\_EXHAUSTED - DYNAMICS365FOROPERATIONS:TIMEOUT ### Execute Operation `` Executes a request against a URL in the `https://host_uri/api/Services/service_group_name/service_group_service_name/operation_name` format. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Parameters

Object

Parameters of the operation to execute.

#[payload]

Config Ref

ConfigurationProvider

The name of the configuration to be used to execute this component

x

Service Group

String

The service group name (first level metadata key).

x

Service Name

String

The service name (second level metadata key).

x

Operation

String

The operation name (third level metadata key).

x

Target Variable

String

The name of a variable in which to store the operation’s output.

Target Value

String

An expression that evaluates against the operation’s output. The outcome of this expression is stored in the target variable.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors.

#### Output

Type

Object

#### For Configurations - [Microsoft Dynamics 365 For Operations Configurations](#Dynamics365ForOperations) #### Throws - DYNAMICS365FOROPERATIONS:CONNECTIVITY - DYNAMICS365FOROPERATIONS:INVALID\_CONNECTION - DYNAMICS365FOROPERATIONS:INVALID\_CREDENTIALS - DYNAMICS365FOROPERATIONS:INVALID\_INPUT - DYNAMICS365FOROPERATIONS:LOGIN\_FAILED - DYNAMICS365FOROPERATIONS:NOT\_FOUND - DYNAMICS365FOROPERATIONS:RETRY\_EXHAUSTED - DYNAMICS365FOROPERATIONS:TIMEOUT ### Export Data From Recurring Job `` Returns a data package that contains all of the data entities defined in the data project as described in [this link](https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/recurring-integrations). #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Download URL

String

URL of the data package to download. It can be extracted from the response of the dequeue recurring job operation.

x

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

Streaming Strategy

  • RepeatableInMemoryStream

  • RepeatableFileStoreStream

  • non-repeatable-stream

Configures how Mule processes streams. The default is to use repeatable streams.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

#### Output

Type

Binary

Attributes Type

Binary

#### For Configurations - [Microsoft Dynamics 365 For Operations Configurations](#Dynamics365ForOperations) #### Throws - DYNAMICS365FOROPERATIONS:CONNECTIVITY - DYNAMICS365FOROPERATIONS:INVALID\_CONNECTION - DYNAMICS365FOROPERATIONS:INVALID\_CREDENTIALS - DYNAMICS365FOROPERATIONS:INVALID\_INPUT - DYNAMICS365FOROPERATIONS:LOGIN\_FAILED - DYNAMICS365FOROPERATIONS:NOT\_FOUND - DYNAMICS365FOROPERATIONS:RETRY\_EXHAUSTED - DYNAMICS365FOROPERATIONS:TIMEOUT ### Import Data Recurring Job `` Facilitates submitting data to recurring data jobs. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Uri Path

String

Import URI, for example: :/api/connector/enqueue/

api/connector/enqueue/

Activity Id

String

Activity ID.

x

Entity Name

String

Entity name.

x

File input

Binary

Data to submit.

#[payload]

Config Ref

ConfigurationProvider

The name of the configuration to be used to execute this component

x

Target Variable

String

The name of a variable in which to store the operation’s output.

Target Value

String

An expression that evaluates against the operation’s output. The outcome of this expression is stored in the target variable.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors.

#### Output

Type

String

#### For Configurations - [Microsoft Dynamics 365 For Operations Configurations](#Dynamics365ForOperations) #### Throws - DYNAMICS365FOROPERATIONS:CONNECTIVITY - DYNAMICS365FOROPERATIONS:INVALID\_CONNECTION - DYNAMICS365FOROPERATIONS:INVALID\_CREDENTIALS - DYNAMICS365FOROPERATIONS:INVALID\_INPUT - DYNAMICS365FOROPERATIONS:LOGIN\_FAILED - DYNAMICS365FOROPERATIONS:NOT\_FOUND - DYNAMICS365FOROPERATIONS:RETRY\_EXHAUSTED - DYNAMICS365FOROPERATIONS:TIMEOUT ### Retrieve Multiple `` Retrieve multiple entities by URL. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

Data Query URL

String

The URL, in ODATA format, to use to retrieve the entities.

#[payload]

Config Ref

ConfigurationProvider

The name of the configuration to be used to execute this component

x

Streaming Strategy

Configure how Mule processes streams with streaming strategies. Repeatable streams are the default behavior.

Target Variable

String

The name of a variable in which to store the operation’s output.

Target Value

String

An expression that evaluates against the operation’s output. The outcome of this expression is stored in the target variable.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors.

#### Output

Type

Array of Object

#### For Configurations - [Microsoft Dynamics 365 For Operations Configurations](#Dynamics365ForOperations) #### Throws - DYNAMICS365FOROPERATIONS:CONNECTIVITY - DYNAMICS365FOROPERATIONS:INVALID\_CONNECTION - DYNAMICS365FOROPERATIONS:INVALID\_CREDENTIALS - DYNAMICS365FOROPERATIONS:INVALID\_INPUT - DYNAMICS365FOROPERATIONS:LOGIN\_FAILED - DYNAMICS365FOROPERATIONS:NOT\_FOUND - DYNAMICS365FOROPERATIONS:TIMEOUT ### Retrieve Multiple By Query `` Retrieve multiple entities by DSQL query. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

The name of the configuration to use.

x

DataSense Query

String

The DSQL query to use to retrieve entities. The query is transformed into a URL internally.

#[payload]

Expand

String

Config Ref

ConfigurationProvider

Name of the configuration used to execute this component.

x

Streaming Strategy

Configure how Mule processes streams with streaming strategies. Repeatable streams are the default behavior.

Target Variable

String

The name of a variable in which to store the operation’s output.

Target Value

String

An expression that evaluates against the operation’s output. The outcome of this expression is stored in the target variable.

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

#### Output

Type

Array of Object

#### For Configurations - [Microsoft Dynamics 365 For Operations Configurations](#Dynamics365ForOperations) #### Throws - DYNAMICS365FOROPERATIONS:CONNECTIVITY - DYNAMICS365FOROPERATIONS:INVALID\_CONNECTION - DYNAMICS365FOROPERATIONS:INVALID\_CREDENTIALS - DYNAMICS365FOROPERATIONS:INVALID\_INPUT - DYNAMICS365FOROPERATIONS:LOGIN\_FAILED - DYNAMICS365FOROPERATIONS:NOT\_FOUND - DYNAMICS365FOROPERATIONS:TIMEOUT ### Unauthorize `` Deletes all of the access token information of a given resource owner ID so that it’s impossible to execute any operation for that user without repeating the authorization dance. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Resource Owner Id

String

ID of the resource owner for whom to invalidate access

Config Ref

ConfigurationProvider

The name of the configuration to be used to execute this component

x

#### For Configurations - [Microsoft Dynamics 365 For Operations Configurations](#Dynamics365ForOperations) ## Types ### TLS
FieldTypeDescriptionDefault ValueRequired

Enabled Protocols

String

A comma-separated list of protocols enabled for this context

Enabled Cipher Suites

String

A comma-separated list of cipher suites enabled for this context

Trust Store

Key Store

Revocation Check

### Truststore
FieldTypeDescriptionDefault ValueRequired

Path

String

The location, which is resolved relative to the current classpath and file system, if possible, of the truststore.

Password

String

The password used to protect the truststore.

Type

String

The type of truststore used.

Algorithm

String

The algorithm used by the truststore.

Insecure

Boolean

If true, no certificate validations are performed, which renders connections vulnerable to attacks. Use at your own risk.

### Keystore
FieldTypeDescriptionDefault ValueRequired

Path

String

The location, which is resolved relative to the current classpath and file system, if possible, of the keystore.

Type

String

The type of keystore used.

Alias

String

When the keystore contains many private keys, this attribute specifies the alias of the key to use. If not specified, the first key in the file is used by default.

Key Password

String

The password used to protect the private key.

Password

String

The password used to protect the keystore.

Algorithm

String

The algorithm used by the keystore.

### Standard Revocation Check
FieldTypeDescriptionDefault ValueRequired

Only End Entities

Boolean

If true, only verifies the last element of the certificate chain.

Prefer Crls

Boolean

If true, try CRL first, then OCSP.

No Fallback

Boolean

Do not use the secondary checking method (the one not selected before).

Soft Fail

Boolean

Avoid verification failure when the revocation server can’t be reached or is busy.

### Custom OCSP Responder
FieldTypeDescriptionDefault ValueRequired

Url

String

The URL of the OCSP responder.

Cert Alias

String

Alias of the signing certificate for the OCSP response (must be in the truststore), if present.

### CRL File
FieldTypeDescriptionDefault ValueRequired

Path

String

The path to the CRL file.

### Reconnection
FieldTypeDescriptionDefault ValueRequired

Fails Deployment

Boolean

When the app is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Reconnection Strategy

The reconnection strategy to use.

### Reconnect
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often to reconnect (in milliseconds).

Count

Number

The number of reconnection attempts to make.

blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

true

### Reconnect Forever
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect.

blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

true

### Expiration Policy
FieldTypeDescriptionDefault ValueRequired

Max Idle Time

Number

A scalar time value for the maximum amount of time a dynamic configuration instance should be allowed to be idle before it’s considered eligible for expiration.

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Max Idle Time attribute.

### Repeatable In-Memory Iterable
FieldTypeDescriptionDefault ValueRequired

Initial Buffer Size

Number

The number of instances to initially keep in memory to consume the stream and provide random access to it. If the stream contains more data than can fit into this buffer, then the buffer expands according to the Buffer Size Increment attribute, with an upper limit of maxInMemorySize. Default value is 100 instances.

100

Buffer Size Increment

Number

Specifies how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer does not expand, and that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full. Default value is 100 instances.

100

Max Buffer Size

Number

The maximum amount of memory to use. If more than that is used, then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value of less than or equal to zero means there is no limit.

### Repeatable File Store Iterable
FieldTypeDescriptionDefault ValueRequired

Max In Memory Size

Number

The maximum number of instances to keep in memory. If more than is required, then content is buffered on to the disk.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

The unit in which Max In Memory Size is expressed.

## See Also [Salesforce Help](https://help.salesforce.com) --- product: Microsoft Dynamics 365 For Finance and Operations Connector version: 3.1 is-latest-version: true --- # Upgrading and Migrating Microsoft Dynamics for Finance and Operations Connector to Version 3.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Microsoft Dynamics 365 for Finance and Operations (Microsoft Dynamics 365 for Finance and Operations Connector) version 3.0 supports OAuth Client Credentials authentication. ## Supported Upgrade Paths
From VersionTo Version

2.x.x

3.x.x

## Changes in This Release The OAuth Client Credentials connection authentication type has been added in Microsoft Dynamics 365 for Finance and Operations Connector version 3.0. To use this authentication method, you must use Mule 4.2.1 or later. ## Requirements Ensure that you are using Mule 4.2.1 or later before you perform the upgrade. ## Upgrade Prerequisites Before you perform the upgrade, you must create a backup of your files, data, and configurations in case you need to restore to them. ## Upgrade Steps Follow these steps to perform the upgrade: 1. In Anypoint Studio, open the Mule project for your connector. 2. In the Anypoint Studio menu, select **Help > Check for Updates**. 3. Select the latest version of **Mule Server Runtime** and click **Next**. 4. Select **I accept the terms of the license agreement** and click **Finish**. 5. In the **Mule Palette** view, click **Search in Exchange**. 6. In **Add Dependencies to Project**, enter `dynamics finance` in the search field. 7. In **Available modules**, select **Microsoft Dynamics 365 for Operations** and click **Add**. 8. Click **Finish**. 9. Click **Yes** to restart Studio. Studio upgrades the connector automatically. 10. After Studio restarts, verify that the dependency version is 3.0.0 in the `pom.xml` file in the Mule project. ### Verify the Upgrade After you install the latest version of the connector, follow these steps to verify the upgrade: 1. In Studio, verify that there are no errors in the **Problems** or **Console** views. 2. Verify that there are no problems in the project `pom.xml` file. 3. Test the connection to verify that the operations work. ### Revert the Upgrade If it is necessary to revert to the previous version of Microsoft Dynamics 365 for Finance and Operations Connector Connector, change the `mule-microsoft-dynamics365-for-operations-connector` dependency version in the project’s `pom.xml` file to the previous version. You must update the project’s `pom.xml` file in Anypoint Studio. --- product: Microsoft Dynamics 365 For Finance and Operations Connector version: 3.1 is-latest-version: true --- # Using Anypoint Studio to Configure Microsoft Dynamics 365 for Finance and Operations Connector 3.1 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure an input source for the connector’s flow](#configure-input-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see [Microsoft Dynamics 365 for Finance and Operations Reference](https://docs.mulesoft.com/microsoft-365-ops-connector/latest/microsoft-365-ops-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure the connector: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Anypoint Connector for Microsoft Dynamics 365 for Finance and Operations (Microsoft Dynamics 365 for Operations Connector) to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In **Add Dependencies to Project**, type `dynamics finance` in the search field. 3. Click the connector name in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Configure a Source A source initiates a flow when a specified condition is met. You can configure one of these sources to use with Microsoft Dynamics 365 for Operations Connector: - `HTTP Listener` Initiates a flow each time it receives a request on the configured host and port - `Scheduler`\+ Initiates a flow when a time-based condition is met For example, to configure HTTP Listener, follow these steps: 1. In the **Mule Palette** view, select **HTTP > Listener**. 2. Drag **Listener** to the Studio canvas. 3. On the **Listener** configuration screen, optionally change the value of the **Display Name** field. 4. Specify a value for the **Path** field. 5. Click the plus sign (+) next to the **Connector configuration** field to configure a global element that can be used by all instances of the HTTP Listener in the app. 6. On the **General** tab, specify connection information. 7. On the **TLS** tab, optionally specify TLS information. 8. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 9. Click **Test Connection** to confirm that Mule can connect with the specific server. 10. Click **OK**. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you immediately define a specific operation for that connector to perform. To add an operation for Microsoft Dynamics 365 for Operations Connector, follow these steps: 1. In the **Mule Palette** view, select **Dynamics 365 for Operations** and then select the desired operation. 2. Drag the operation onto the Studio canvas and to the right of the input source. ## Configure a Global Element for the Connector When you configure a connector, it’s best to configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials the connector uses to access the target Microsoft Dynamics 365 system. Microsoft Dynamics 365 for Operations Connector supports OAuth 2.0 authentication. To configure the global element for Microsoft Dynamics 365 for Operations Connector, follow these steps: 1. Select the name of the connector in the Studio canvas. 2. In the configuration screen for the operation, click the plus sign (**+**) next to the **Connector configuration** field to access the global element configuration fields. 3. On the **General** tab, in **Connection**, select the authentication method to configure: - [**OAuth Client Credentials**](#oauth-client-credentials) - [**OAuth 2.0**](#oauth-2.0) You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. ### OAuth Client Credentials Use OAuth 2.0 to delegate user authentication to the service hosting the user account. For more information, refer to [Configuring OAuth 2.0 for Connectors](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2), [Configuring OAuth 2.0 for Connectors on CloudHub](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2-cloudhub), or [OAuth Support in the SDK](https://docs.mulesoft.com/mule-sdk/latest/oauth). Enter the following required information on the **General** tab of the **Global Element Properties** screen to configure **OAuth Client Credentials** authentication:
FieldDescription

Resource

App ID URI of the web API

Client Id

OAuth client ID as registered with the service provider

Client Secret

OAuth client secret as registered with the service provider

### OAuth 2.0 Use OAuth 2.0 to delegate user authentication to the service hosting the user account. For more information, refer to [Configuring OAuth 2.0 for Connectors](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2), [Configuring OAuth 2.0 for Connectors on CloudHub](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2-cloudhub), or [OAuth Support in the SDK](https://docs.mulesoft.com/mule-sdk/latest/oauth). Enter the following information on the **General** tab of the **Global Element Properties** screen to configure **OAuth 2.0** authentication:
FieldDescription

Resource

The OAuth endpoint URL.

Consumer Key

The app ID assigned to your app when you registered it with Azure Active Directory. You can find this in the Azure Portal (portal.azure.com). Click Active Directory, click the directory, choose the app, and click Configure.

Consumer Secret

The secret that you created in the app registration portal for your app. Do not use this in a native app because client secrets cannot be reliably stored on devices. The client secret is required for web apps and web APIs, which have the ability to store the client secret securely on the server side. You can find this in the Azure Portal (portal.azure.com). A client secret is a numerical value known only to your app and the Azure server, which enables access for your app.

Authorization URL

Tenant-specific OAuth2.0 endpoint in the format: https://login.microsoftonline.com/{tenant}/oauth2/authorize (follow instructions presented in the previous link for specific information on how to obtain the endpoint).

Access token URL

Tenant-specific endpoint for requesting the access token in the format: https://login.microsoftonline.com/{tenant}/oauth2/token (follow instructions presented in the previous link for specific information on how to obtain the endpoint).

Listener config

Name of the HTTP Listener instance created in the Anypoint Studio flow.

Callback path

The URL to which authentication responses can be sent and received by your app.

Authorize path

The URL that triggers the OAuth mechanism.

External callback URL

Required only if the callback URL is not accessible directly, for example, when using proxies. The callback path uses this format: http://localhost:8081/callback

\+ image::microsoft-365-ops-as-oauth2.png\["Microsoft Dynamics for Finance and Operations Connector OAuth 2.0 configuration fields"\] ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Microsoft Dynamics 365 for Finance and Operations Connector Reference](https://docs.mulesoft.com/microsoft-365-ops-connector/latest/microsoft-365-ops-connector-reference) - [Salesforce Help](https://help.salesforce.com)