feat(integrations): add Dynamics 365 CRM - #6714
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryHigh Risk Overview Environment-bound OAuth is new for Dynamics paths: connect/reconnect flows collect a public-cloud Dataverse environment URL, request per-environment Microsoft scopes, validate link/callback scopes in auth, and persist an internal environment marker so credentials are not rebound across environments. Legacy unbound Dataverse credentials keep working; workflow credential selection enforces a matching environment when the block depends on Docs, integrations catalog, and icon mappings register Reviewed by Cursor Bugbot for commit a2842cf. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryAdds a Microsoft Dynamics 365 CRM integration backed by environment-bound Dataverse OAuth and eight CRM tool modules.
Confidence Score: 5/5The PR appears safe to merge from the reviewed follow-up scope because the previously reported redirect credential leak has been fixed. No blocking failure remains from the prior redirect-safety finding: every Dynamics request enables authorization stripping, the shared transport enforces it on redirects, and the regression test covers all eight request definitions.
|
| Filename | Overview |
|---|---|
| apps/sim/tools/microsoft_dynamics_365/create_record.ts | Defines environment-scoped record creation and now strips authorization before following redirects. |
| apps/sim/tools/microsoft_dynamics_365/dynamics_crm.test.ts | Exercises shared CRM behavior and verifies redirect-safe request configuration across all eight tool definitions. |
| apps/sim/lib/oauth/microsoft-dataverse.ts | Implements public-cloud environment normalization, environment-qualified scopes, and credential-binding classification. |
| apps/sim/app/workspace/[workspaceId]/components/connect-oauth-modal/connect-oauth-modal.tsx | Routes Dynamics connections through the environment-bound Dataverse OAuth flow while retaining the generic OAuth path. |
| apps/sim/blocks/blocks/microsoft_dynamics_365.ts | Defines the ten-operation Dynamics workflow block and maps its operation-specific parameters to eight CRM tools. |
Sequence Diagram
sequenceDiagram
actor User
participant UI as Workflow or integration UI
participant OAuth as Dataverse OAuth
participant Executor as Tool executor
participant CRM as Dynamics 365 CRM
User->>UI: Select environment and connect
UI->>OAuth: Request environment-qualified scopes
OAuth-->>UI: Environment-bound credential
User->>UI: Configure CRM operation
UI->>Executor: Execute with credential and environment
Executor->>CRM: Dataverse API request
Note over Executor,CRM: Authorization removed before following redirects
CRM-->>Executor: Structured CRM response
Executor-->>UI: Normalized operation output
Reviews (7): Last reviewed commit: "test(integrations): isolate Dynamics OAu..." | Re-trigger Greptile
|
@greptile please re-review the latest commit. |
|
@cursor review |
d757dd4 to
2a508dd
Compare
|
@cursor review |
|
@greptile please re-review the rebased latest commit. |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 2a508dd. Configure here.
2a508dd to
a2842cf
Compare
|
@greptile please re-review the latest exact-head commit. The update preserves the opaque Dataverse nextLink with a paired page-size contract and aligns Opportunity Close/Case Resolution metadata limits. |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit a2842cf. Configure here.
a2842cf to
2562939
Compare
Summary
nextLinkwhile pairing it with the page size required for the next requestCompatibility and safety
microsoft_dataverse_*implementations and documentation are unchanged; shared generated registries change additively to register DynamicsValidation
bun run test: Sim reported 25,507 passed / 46 skipped; setup and all other package suites also passedgit diff --checkpassedMerge prerequisite
Do not merge until #6716 lands and this branch is rebased onto that platform fix.