Skip to content

Add Microsoft Dataverse DirectConnector samples#63

Merged
daviburg merged 5 commits into
mainfrom
feature/dataverse-sdk-0.13-samples
Jul 13, 2026
Merged

Add Microsoft Dataverse DirectConnector samples#63
daviburg merged 5 commits into
mainfrom
feature/dataverse-sdk-0.13-samples

Conversation

@daviburg

@daviburg daviburg commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

Updates the DirectConnector Azure Functions samples to consume Azure.Connectors.Sdk 0.13.0-preview.1, demonstrate the generated Microsoft Dataverse client, and use the SDK's ConnectorTriggerPayload helper for a typed Office 365 trigger callback.

Changes

  • Adds Dataverse environment/table discovery plus record list, get, create, update, delete, binary attachment, and next-page examples.
  • Registers CommondataserviceClient with DefaultAzureCredential, system-assigned managed identity, and user-assigned managed identity support.
  • Adds SharePoint site discovery so callers can use a returned site value for site-scoped operations.
  • Replaces manual Office 365 OnNewEmail callback buffering/deserialization with bounded, case-insensitive ConnectorTriggerPayload.ReadAsync handling.
  • Adds Azure Monitor Logs query and query-schema endpoints, including dynamic-schema result handling.
  • Adds ARM resource-group read, create/update, and delete endpoints for safe temporary-resource lifecycle validation.
  • Documents discovery-first, cleanup, deployed-route, and negative-evidence E2E rules in the repository instructions.

Validation

  • dotnet build Connectors-NET-Samples.sln --configuration Release - 0 warnings, 0 errors.
  • dotnet test Connectors-NET-Samples.sln --configuration Release --no-build - 46/46 passed.
  • Deployed validation exercised Dataverse discovery, CRUD, binary attachment creation, and record cleanup.
  • Deployed validation discovered a SharePoint site and completed a site-scoped list operation.
  • Deployed validation exercised ConnectorTriggerPayload with a Connector Gateway-shaped Office 365 OnNewEmail callback payload.
  • Deployed validation exercised Azure Monitor Logs query-data and query-schema operations against an Application Insights resource.
  • Deployed validation exercised ARM subscription, resource-group, resource-list, and resource-read operations, then created, read, listed the empty contents of, and deleted a uniquely named temporary resource group.

Checklist

  • Code follows the project's coding conventions.
  • Documentation and connection template updated.
  • No subscription, resource group, runtime URL, identity, tenant, credential, or other environment-specific values are included.

Use query parameters for Dataverse environment URLs because encoded slash values return HTTP 404 when bound through Azure Functions route parameters.

Co-authored-by: Dobby <dobby@microsoft.com>
Copilot AI review requested due to automatic review settings July 10, 2026 16:07
@daviburg
daviburg requested a review from a team as a code owner July 10, 2026 16:07
@daviburg daviburg self-assigned this Jul 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the DirectConnector Azure Functions sample app to use Azure.Connectors.Sdk 0.13.0-preview.1 and adds an end-to-end Microsoft Dataverse sample demonstrating environment/table discovery and CRUD operations through the generated connector client.

Changes:

  • Added DataverseFunctions with discovery + table/record list, get, create, update, and delete endpoints using query parameters for environment and tableName.
  • Registered CommondataserviceClient in Program.cs, supporting DefaultAzureCredential (dev) plus system/user-assigned managed identity via configuration.
  • Updated documentation and local settings template to include Dataverse connection placeholders, and bumped the SDK package version.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
README.md Adds Dataverse sample to the top-level sample list.
DirectConnector/README.md Documents Dataverse endpoints, configuration, and example invocations.
DirectConnector/Program.cs Registers CommondataserviceClient with DI and managed-identity/TokenCredential selection logic.
DirectConnector/local.settings.json.template Adds Dataverse connection runtime URL and MSI placeholder settings.
DirectConnector/DirectConnector.csproj Bumps Azure.Connectors.Sdk to 0.13.0-preview.1.
DirectConnector/DataverseFunctions.cs Introduces Dataverse discovery + CRUD Azure Functions using the generated client.

Comment thread DirectConnector/DataverseFunctions.cs
Use ConnectorTriggerPayload for the Office 365 OnNewEmail callback so metadata trigger bodies are bounded and deserialized case-insensitively.

Co-authored-by: Dobby <dobby@microsoft.com>
Copilot AI review requested due to automatic review settings July 10, 2026 17:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 11 comments.

Comment thread DirectConnector/DataverseFunctions.cs
Comment thread DirectConnector/DataverseFunctions.cs Outdated
Comment thread DirectConnector/DataverseFunctions.cs Outdated
Comment thread DirectConnector/DataverseFunctions.cs Outdated
Comment thread DirectConnector/DataverseFunctions.cs Outdated
Comment thread DirectConnector/DataverseFunctions.cs Outdated
Comment thread DirectConnector/DataverseFunctions.cs Outdated
Comment thread DirectConnector/DataverseFunctions.cs Outdated
Comment thread DirectConnector/DataverseFunctions.cs Outdated
Comment thread DirectConnector/DataverseFunctions.cs Outdated
Covers CreateAttachmentAsync and GetNextPageAsync, and adds SharePoint GetDataSetsAsync discovery to prevent dependent calls with placeholder values.

Co-authored-by: Dobby <dobby@microsoft.com>
Copilot AI review requested due to automatic review settings July 10, 2026 17:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Comment thread DirectConnector/DataverseFunctions.cs
Comment thread DirectConnector/DataverseFunctions.cs
Comment thread DirectConnector/DataverseFunctions.cs Outdated
Returns 400 for malformed JSON and invalid $top values, with regression coverage for create and update bodies.

Co-authored-by: Dobby <dobby@microsoft.com>
Copilot AI review requested due to automatic review settings July 10, 2026 18:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Comment thread DirectConnector/DataverseFunctions.cs
Add query/schema and temporary resource-group lifecycle samples with E2E validation guidance.

Co-authored-by: Dobby <dobby@microsoft.com>
Copilot AI review requested due to automatic review settings July 11, 2026 05:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.

@daviburg
daviburg merged commit dc023bc into main Jul 13, 2026
9 checks passed
@daviburg
daviburg deleted the feature/dataverse-sdk-0.13-samples branch July 13, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants