Microsoft Dynamics 365 Connector - Get Started | MuleSoft Documentation
# Microsoft Dynamics 365 Connector - Get Started
Microsoft Dynamics 365 Connector v2.3.1
Anypoint Connector for Microsoft Dynamics 365 (Microsoft Dynamics 365 Connector) enables integration with the Microsoft Dynamics 365 Cloud API.
This connector enables you to perform operations to:
  * Authorize or unauthorize server access
  * Create, update, and delete entities
  * Retrieve a single entity or query multiple entities
  * Associate and disassociate entities
  * Execute actions


Release Notes: Microsoft Dynamics 365 Connector Release Notes Exchange: Microsoft Dynamics 365 Connector
## Audience
  * Starting user: To create your Mule app, see Studio Configuration. The Examples topic provides one or more use cases for using the connector.
  * Power user: Read the XML and Maven Support and Examples topics.


## Before You Begin
Before creating an app, you must have access to the Microsoft Dynamics 365 target resource and Anypoint Platform. You also must understand how to create a Mule app using Anypoint Studio.
Obtain a client ID and secret for your app by logging in to the Microsoft Azure Active Directory portal at portal.azure.com.
Before starting:
You need access to a Microsoft Dynamics 365 instance for which Azure Active Directory is the Identity Provider that provides access to an application.
## OAuth Types
Microsoft Dynamics 365 Connector supports:
  * OAuth by connection to servers that handle authorization and token access
  * OAuth Username and Password


## Input Sources (Triggers)
Anypoint Connector for Microsoft Dynamics 365 enables you to start an app using these input sources:
  * On New Object: Start your app when an object is created.
  * On Modified Object: Start your app when an object is modified.


Alternatively, you can use HTTP to listen for inputs or use a scheduler to choose when to run your app.
## Trigger Required Fields
On New Object and On Modified Object have the same required field names.
  * Entity Type
Business data as defined by a Microsoft Dynamics 365 instance. Examples are `account` and `contact`.
  * Connection
OAuth connection types. Can be `Connection` to connect via URLs to servers that handle authorization and token access, or `OAuth Username Password` to connect by specifying a user name and password.


### Connection Required Fields
  * Resource Resource URL for accessing the Microsoft Dynamics 365 instance
  * Consumer Key OAuth consumer key registered with the service provider
  * Consumer Secret OAuth consumer secret registered with the service provider
  * Listener Config A reference to the listener that catches the access token callback endpoint
  * Callback Path The path of the access token callback endpoint
  * Authorize Path The path of the local HTTP endpoint that triggers the OAuth dance


### OAuth Username Password Required Fields
  * Username User name used to initialize the session
  * Password Password used to authenticate against the proxy
  * Resource Application ID URI of the web API’s secured resource
  * Client ID Application ID assigned to your app when you registered it with Azure AD. You can find this in the Azure Portal.
  * Client Secret App 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.
  * Token Request Endpoint URL of the OAuth token request server


## Terminology 

Actions
    
Operations that allow side effects, such as data modification, cannot be further composed to avoid non-deterministic behavior. 

Complex types
    
Keyless structured types consisting of a set of properties. Complex types are commonly used as property values in model entities, or as parameters or return values for operations. 

Entities
    
Instances of entity types, for example, an account or an opportunity. 

Entity set
    
Collections of entities, for example, an account is an entity set containing account entities. An entity’s key uniquely identifies the entity within an entity set. 

Entity types
    
Structured types with a key. Entity types define the properties and relationships of an entity, and may derive by single inheritance from other entity types. 

Enumeration types or enum types
    
Primitive types whose values are constants with underlying integer values. 

Functions
    
Operations that do not have side effects and may support further composition, for example, with additional filter operations, functions, or an action.
## Common Use Cases
The following use cases are described in the Examples topic.
  * Create an account with attributes that associate an account with a contact
  * Create an empty contact entity
  * Create an empty opportunity entity
  * Create multiple entities of the same type in a single batch request
  * Delete an entity by type
  * Disassociate keys based on an identity ID
  * Retrieve an entity by type
  * Retrieve multiple entities using a URL request
  * Retrieve multiple entities using DataSense query language
  * Update an account with attributes
  * Update multiple entities of the same type in a single batch request


## Next Step
After you have met the prerequisites and experimented with templates and examples, you are ready to create an app with Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center