feat: add Microsoft Dataverse (commondataservice) connector client#192
Open
daviburg wants to merge 7 commits into
Open
feat: add Microsoft Dataverse (commondataservice) connector client#192daviburg wants to merge 7 commits into
daviburg wants to merge 7 commits into
Conversation
Generate the current-environment Microsoft Dataverse connector client via the BPM CodefulSdkGenerator (--directClient --connectors=commondataservice). The generated CommondataserviceClient covers modern row operations (ListRecords, CreateRecord, GetItemCodeless, UpdateRecord, DeleteRecord), bound/unbound actions, relate/unrelate, relevance search, file/image column upload/download, and changeset transactions. Deprecated legacy dataset/table operations are excluded by the generator's existing deprecation filter. Adds CommondataserviceClientTests.cs (constructors, dispose, mocked API call, error handling, serialization round-trips). Updates ROADMAP (2.1 Dataverse -> Complete), CHANGELOG [Unreleased], and the connection-setup skill connector list. Registry files (ConnectorNames/ManagedConnectors) already contained commondataservice.
There was a problem hiding this comment.
Pull request overview
Adds a new generated typed client for the Logic Apps Microsoft Dataverse connector (commondataservice) to the SDK, along with initial unit tests and documentation/roadmap updates.
Changes:
- Added generated
CommondataserviceClient(plus models, trigger constants/parameters, and model factory) forcommondataservice. - Added unit tests covering construction/disposal, a mocked API call, error handling, and basic model JSON round-trips.
- Updated docs/metadata (ROADMAP, CHANGELOG, and connection-setup skill connector list) to reflect the new connector client.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/Azure.Connectors.Sdk/Generated/CommondataserviceExtensions.cs |
New generated Dataverse connector client, models, trigger constants/metadata, and model factory. |
tests/Azure.Connectors.Sdk.Tests/CommondataserviceClientTests.cs |
New tests for client construction/disposal, mocked responses, error handling, and serialization round-trips. |
ROADMAP.md |
Marks Dataverse (commondataservice) as complete in Phase 2. |
CHANGELOG.md |
Adds an Unreleased entry documenting the new Dataverse client. |
.github/skills/connection-setup/SKILL.md |
Adds commondataservice to the supported connector name list. |
…+FFFD sanitization fix Regenerated CommondataserviceExtensions.cs with the BPM CodefulSdkGenerator fix that normalizes the Unicode replacement character (U+FFFD) in swagger text to an apostrophe. The 'Upsert a row' XML doc remark now reads 'doesn't exist' instead of containing a corrupted replacement character.
…ext fixes Regenerated CommondataserviceExtensions.cs after adding 'by pass'->'bypass' and 'Odata'->'OData' corrections to the generator's SwaggerTextCorrections (BPM PR 16059042).
ConnectorClientBase.Dispose only sets a disposed flag (no internal HttpClient field or post-dispose guard), so Dispose_WithInternallyCreatedHttpClient_ShouldDisposeIt did not verify disposal and duplicated Dispose_CalledTwice_ShouldNotThrow. Removed it.
…angeset op ExecuteChangeset consumes multipart/mixed and the swagger models no request body; ConnectorClientBase cannot compose multipart payloads, so the generated ExecuteChangesetAsync was unusable. Added a generator skip for multipart-consuming operations (BPM PR 16059042) and regenerated; ExecuteChangesetAsync is no longer emitted.
ExecuteChangesetAsync is no longer generated (multipart op skipped), so remove the now-inaccurate changeset mentions from the Unreleased changelog entry and the ROADMAP Dataverse row.
Regenerated the Dataverse client using only the legacy CDM v2 API paths
(e.g., /v2/datasets/{dataset}/tables/{table}/items) that are supported
through the Connector Namespace routing layer.
Key changes:
- Replaced modern Dataverse Web API paths (which return 404 via
Connector Namespace) with working legacy v2/CDM paths
- Added DoubleEscape helper for x-ms-url-encoding: double support
(dataset URLs contain slashes/colons that need double encoding)
- Client now exposes 22 operations: CRUD, metadata, attachments,
relationships, triggers, and pagination
- Updated tests to match new API surface (DataSet/DataSetsList
instead of OrganizationsDynamicValuesList)
E2E validated against devrelprod.crm.dynamics.com:
- GetDataSetsAsync: 1330 environments returned
- GetTablesAsync: 884 tables listed
- GetItemsAsync: account records successfully read
Member
Author
E2E Validation — Legacy CDM v2 Paths ✅Regenerated the Dataverse client with legacy CDM v2 API paths (the only paths supported through Connector Namespace routing). All three validation functions tested successfully against \devrelprod.crm.dynamics.com:
Key Technical Details
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the Microsoft Dataverse connector client (
commondataservice) to the SDK — the current-environment Microsoft Dataverse connector available in Logic Apps.Generated operations (29 methods)
ListRecordsAsync(AsyncPageable),CreateRecordAsync,GetItemCodelessAsync,UpdateRecordAsync,DeleteRecordAsyncPerformBoundActionAsync,PerformUnboundActionAsync(+ bound/unbound discovery & metadata)AssociateEntitiesAsync,DisassociateEntitiesAsyncGetRelevantRowsAsync,UpdateEntityFileImageFieldContentAsync,GetEntityFileImageFieldContentAsyncExecuteChangesetAsyncDeprecated legacy operations (
PostItem/GetItems/PatchItem/DeleteItem) are excluded by the generator's deprecation filter — no generator change was required.Changes
src/Azure.Connectors.Sdk/Generated/CommondataserviceExtensions.cs— generated client (do not hand-edit; regenerate via the BPM CodefulSdkGenerator).tests/Azure.Connectors.Sdk.Tests/CommondataserviceClientTests.cs— constructors, dispose, mocked API call, error handling, serialization round-trips.ROADMAP.md(2.1 Dataverse → Complete),CHANGELOG.md([Unreleased] → Added), connection-setup skill connector list.ConnectorNames.cs/ManagedConnectors.cs) already containedcommondataservice— no edits.Validation
dotnet build: 0 warnings, 0 errors.dotnet test: 861 passed, 0 failed (incl.ConnectorConstantsregistry tests).E2E validation (sample app, AI Gateway connection, OAuth consent) is not included in this PR.