CONNECT APP
Build with Microsoft Dynamics 365 Sales
CRM
- OAuth
MCP
Give your agent Microsoft Dynamics 365 Sales tools
Every Microsoft Dynamics 365 Sales action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's Microsoft Dynamics 365 Sales account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "microsoft_dynamics_365_sales",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Create Appointment:
const result = await mcp.callTool({
name: "microsoft_dynamics_365_sales-create-appointment",
arguments: {
subject: "Subject",
scheduledstart: "Scheduled Start",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "microsoft_dynamics_365_sales",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Create Appointment:
result = await session.call_tool("microsoft_dynamics_365_sales-create-appointment", {
"subject": "Subject",
"scheduledstart": "Scheduled Start",
})API PROXY
Call the Microsoft Dynamics 365 Sales API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the Microsoft Dynamics 365 Sales API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://api.example.com/v1/me",
})
// Any allowed Microsoft Dynamics 365 Sales endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://api.example.com/v1/me
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEvbWU?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run Microsoft Dynamics 365 Sales actions from your backend
Connect a user's Microsoft Dynamics 365 Sales account once, then run Create Appointment on their behalf from your own code — TypeScript, Python, or plain HTTP.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "microsoft_dynamics_365_sales-create-appointment",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
microsoft_dynamics_365_sales: { authProvisionId: "apn_xxxxxxx" },
subject: "Subject",
scheduledstart: "Scheduled Start",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="microsoft_dynamics_365_sales-create-appointment",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"microsoft_dynamics_365_sales": {"authProvisionId": "apn_xxxxxxx"},
"subject": "Subject",
"scheduledstart": "Scheduled Start",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "microsoft_dynamics_365_sales-create-appointment",
"configured_props": {
"microsoft_dynamics_365_sales": { "authProvisionId": "apn_xxxxxxx" },
"subject": "Subject",
"scheduledstart": "Scheduled Start"
}
}'TOOLS
Microsoft Dynamics 365 Sales actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Create Appointment
actionCreate a new appointment linked to an account with a required attendee (system user). Use List Appointment Categories for valid category values. See the documentation and the appointment entity referenceWritev0.0.3 -
Create Custom Entity
actionCreate a custom entity. See the documentationWritev0.0.9 -
Find Contact
actionSearch for a contact by id, name, or using a custom filter. See the documentationRead-onlyv0.0.10 -
Get Account
actionRetrieve a single account by GUID. See the documentationRead-onlyv0.0.2 -
List Accounts
actionList accounts with selected fields (accountid,name, phone, email, primary contact). See the documentationRead-onlyv0.0.3 -
List Appointment Categories
actionList Category of Appointment options for the custom attribute used by create/update appointment actions (loaded from metadata or distinct values on existing rows). See the documentationRead-onlyv0.0.3 -
List Appointment Category Options
actionRetrieves available options for the Category of appointment field.Read-onlyv0.0.2 -
List Appointments
actionList appointments (full entity per row, ordered by scheduled start descending). See the documentationRead-onlyv0.0.3 -
List Solution ID Options
actionRetrieves available options for the Solution ID field.Read-onlyv0.0.2 -
Search Accounts
actionSearch accounts by company name usingcontains(name, …). See the documentationRead-onlyv0.0.2 -
Update Account
actionUpdate an existing account; only the fields you supply are sent. See the account entity reference for the full list of updatable fields. See the documentationWritev0.0.2 -
Update Appointment
actionPatch an appointment; only supplied fields are sent. Use List Appointment Categories for category values. See the documentation and the appointment entity referenceWritev0.0.3
EVENTS
Microsoft Dynamics 365 Sales triggers
Event sources your backend can deploy for users and receive through a webhook.
-
Account Ownership Changed
triggerEmit new event when the ownership of an account changes.v0.0.4 -
Account Status Changed
triggerEmit new event when an account is activated or deactivated.v0.0.4 -
Contact Added to Account
triggerEmit new event when a contact is added to an account.v0.0.4 -
New Account Activity
triggerEmit new event when a new task or activity is created for an account.v0.0.4 -
New Account Created
triggerEmit new event when a new account is created.v0.0.4 -
New Opportunity Activity
triggerEmit new event when a new task or activity is created for an opportunity.v0.0.5 -
New Opportunity Created
triggerEmit new event when a new opportunity is created.v0.0.6 -
Opportunity Close Date Updated
triggerEmit new event when the estimated close date of an opportunity is updated.v0.0.6 -
Opportunity Close Probability Updated
triggerEmit new event when the close probability of an opportunity is updated.v0.0.6 -
Opportunity Contact Changed
triggerEmit new event when an opportunity's contact is changed.v0.1.3 -
Opportunity Estimated Value Updated
triggerEmit new event when the estimated value of an opportunity is updated.v0.0.6 -
Opportunity Marked Won or Lost
triggerEmit new event when an opportunity is marked as won or lost.v0.0.5 -
Opportunity Ownership Changed
triggerEmit new event when the ownership of an opportunity changes.v0.0.5 -
Opportunity Reopened
triggerEmit new event when an opportunity is reopened.v0.0.5 -
Opportunity Stage Updated
triggerEmit new event when the stage of an opportunity is updated.v0.0.6
MULTI-APP
Use Microsoft Dynamics 365 Sales with other popular apps
Most products don't stop at one integration. Pair Microsoft Dynamics 365 Sales with the other apps your users rely on, and ship use cases that span both.
REFERENCE
App details
Reference metadata for the Microsoft Dynamics 365 Sales connector in the Pipedream registry.
- App slug
- microsoft_dynamics_365_sales
- Authentication
- OAuth
- Categories
- CRM
- Actions
- 12
- Triggers
- 15
- API proxy
- Available
OAuth scopes
These are the scopes Pipedream's managed Microsoft Dynamics 365 Sales OAuth client requests when one of your users connects an account. Supply your own OAuth client to request a different set.
- offline_access
- openid
- profile