Microsoft Dynamics 365 Component
Query, create, update or delete Microsoft Dynamics 365 API records
Component key: ms-dynamicsDescription
Microsoft Dynamics 365 is a product line of enterprise resource planning (ERP) and customer relationship management (CRM) intelligent business applications. This component gives you the ability to query and modify records within the Microsoft Dynamics 365 platform.
Connections
MS Dynamics OAuth 2.0 Client Credentials
The OAuth 2.0 client credentials flow allows your user to create an Application User to send requests to Dynamics on their behalf. Setting up a client credentials connection is a two-step process:
- Create an "App" in Azure
- Create an "Application User" in Dynamics
Create an app in Microsoft Azure
- Log in to Azure Portal
- Select App registrations
- Click + New registration
- Supported account types can be Single tenant
- No Redirect URI is necessary
- Click Register
- Under API permissions click +Add a permission
- Select Dynamics CRM
- Check the
user_impersonation
permission - Click Add permissions
- Under API permissions click Grant admin concent for (your org)
- Under Certificates & secrets click + New client secret
- Give your certificate a description and expiration date
- Take note of the value (not the Secret ID) of the client secret.
- Returning to the Overview page, take note of Application (client) ID
- From the Overview page, click Endpoints and take note of the OAuth 2.0 token endpoint (v2)
You will use the Secret Value, Client ID and Token Endpoint in a moment.
Add the app as an App User to Dynamics
- Log in to Power Platform admin center
- Select Environments and choose your Dynamics Environments
- Select S2S Apps
- Click +New app user
- Click +Add an app
- Choose the app you created in Azure portal (above). You can search for your app by entering the client ID you noted.
- Select your Dynamics tenant as your Business unit
- Under Security Roles select System Administrator
- Click Create
Configure the connection in Prismatic
Within Prismatic, create a connection of type MS Dynamics OAuth 2.0 Client Credentials.
- Enter the Token Endpoint you noted as your Token URL.
- Enter the Client ID and Secret Value you noted above.
- Log in to Dynamics and take note of the Dynamics URL.
- Enter that Dynamics URL as the Web API URL. It should look like
https://REPLACE-ME.crm.dynamics.com/
- Under scopes, enter the Dynamics URL with
.default
appended to it -https://REPLACE-ME.crm.dynamics.com/.default
- Enter that Dynamics URL as the Web API URL. It should look like
MS Dynamics OAuth 2.0 Auth Code
The OAuth 2.0 auth code flow allows your user grant permission to your integration to interact with Dynamics on their behalf.
- Log in to Azure Portal
- Select App registrations
- Click + New registration
- Supported account types should be Multi-tenant if you intend for customers to authenticate with their own Dynamics instance, or Single-tenant if you intend to authenticate with your own Dynamics instance.
- Under Redirect URI enter https://oauth2.prismatic.io/callback
- Click Register
- Under API permissions click +Add a permission
- Select Dynamics CRM
- Check the
user_impersonation
permission - Click Add permissions
- Under Certificates & secrets click + New client secret
- Give your certificate a description and expiration date
- Take note of the value (not the Secret ID) of the client secret.
- Returning to the Overview page, take note of Application (client) ID
Within Prismatic, create a connection of type MS Dynamics OAuth 2.0 Auth Code.
- Enter the Client ID and Secret Value you noted above.
- Log in to Dynamics and take note of the Dynamics URL.
- Enter that Dynamics URL as the Web API URL. It should look like
https://REPLACE-ME.crm.dynamics.com/
- Under scopes, enter the following, replacing the URL with your Dynamics URL:
https://REPLACE-ME.crm.dynamics.com/user_impersonation offline_access
- Enter that Dynamics URL as the Web API URL. It should look like
Triggers
MS Dynamics 365 Webhook
Handle webhook requests from MS Dynamics 365 | key: dynamicsWebhookTrigger
Data Sources
[CRM] Entity Object Selection
A subset of Dynamics CRM Entity Types. | key: getEntitiesMetaData | type: objectSelection
Actions
[CRM] Batch Entity Actions
Perform multiple create/update/delete actions on Microsoft Dynamics 365 CRM entity records. | key: batchEntityActions
[CRM] Create Attribute
Create a CRM Attribute on an Entity | key: createAttribute
[CRM] Create Entity
Create a new Microsoft Dynamics 365 CRM entity record. | key: createEntity
[CRM] Delete Entity
Delete the specified Microsoft Dynamics 365 CRM entity record. | key: deleteEntity
[CRM] Get Attribute
Retrieve a single CRM Attribute | key: getAttribute
[CRM] Get Current User
Get information about the currently logged in CRM user | key: getCurrentUser
Output Example Payload
{
"data": {
"@odata.context": "https://my-org.crm.dynamics.com/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.WhoAmIResponse",
"BusinessUnitId": "00000000-0000-0000-0000-000000000000",
"UserId": "00000000-0000-0000-0000-000000000000",
"OrganizationId": "00000000-0000-0000-0000-000000000000"
}
}
[CRM] Get Entities Metadata
A subset of Dynamics CRM Entity Types. | key: getEntitiesMetaData
[CRM] Get Entity
Retrieve a single Microsoft Dynamics 365 CRM entity record. | key: getEntity
[CRM] Get Entity Metadata
Get definition of Microsoft Dynamics 365 CRM entity. | key: getEntityMetaData
[CRM] Query Attributes
Query for CRM Attributes that satisfy the filter expression | key: queryAttributes
[CRM] Query Entities
Query for Microsoft Dynamics 365 CRM entity records that satisfy the filter expression. | key: queryEntities
[CRM] Raw Request
Send a raw request to Microsoft Dynamics 365 CRM | key: rawRequest
[CRM] Run Fetch XML Query
Execute a fetch XML query against your Microsoft Dynamics 365 CRM instance. | key: fetchXml
[CRM] Update Attribute
Update an existing CRM Attribute on an Entity | key: updateAttribute
[CRM] Update Entity
Update a Microsoft Dynamics 365 CRM entity record. | key: updateEntity
[CRM] Upsert Entity
Upsert a Microsoft Dynamics 365 CRM entity record. | key: upsertEntity
Raw Request
Send a raw HTTP request to Microsoft Dynamics 365 API | key: rawRequestV2