Add Office 365 Users connector client#75
Conversation
There was a problem hiding this comment.
Pull request overview
Adds new generated DirectClient connector clients (Office 365 Users and Azure Log Analytics) to the Azure Logic Apps connector SDK, along with shared pagination abstractions and registration/docs updates to make the new connectors discoverable and usable.
Changes:
- Added generated connector clients:
Office365usersClientandAzureloganalyticsClient. - Introduced paging primitives (
IPageable<T>,ConnectorPageable<TPage, TItem>) and updated generated clients to expose auto-paging APIs. - Registered new connectors and updated docs/tests for Office 365 Users.
Reviewed changes
Copilot reviewed 5 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Microsoft.Azure.Connectors.Sdk.Tests/Office365usersClientTests.cs | Adds unit tests for the new Office365 Users generated client. |
| src/Microsoft.Azure.Connectors.Sdk/IPageable.cs | Introduces the SDK interface for paged responses (Value/NextLink). |
| src/Microsoft.Azure.Connectors.Sdk/ConnectorPageable.cs | Adds auto-pagination via IAsyncEnumerable<T> over IPageable<T>. |
| src/Microsoft.Azure.Connectors.Sdk/Generated/Office365usersExtensions.cs | Adds the generated Office365 Users client and DTOs, including a pageable SearchUserAsync. |
| src/Microsoft.Azure.Connectors.Sdk/Generated/AzureloganalyticsExtensions.cs | Adds the generated Azure Log Analytics client and DTOs, including pageable discovery ops. |
| src/Microsoft.Azure.Connectors.Sdk/Generated/ManagedConnectors.cs | Registers azureloganalytics and office365users in AvailableConnectors and usage header. |
| src/Microsoft.Azure.Connectors.Sdk/Generated/ConnectorNames.cs | Adds connector name constants for the new connectors. |
| README.md | Updates the validated connectors table to include Office365 Users. |
| .github/skills/connection-setup/SKILL.md | Updates the supported connector names list for connection setup guidance. |
Comments suppressed due to low confidence (1)
.github/skills/connection-setup/SKILL.md:72
- The supported connector names list was updated, but it’s now out of sync with the connectors registered in
DirectClientConnectors.AvailableConnectors(missingazureloganalytics). Also, the$connectorNameexample comment still omits the newly addedoffice365users(and would needazureloganalyticstoo if supported here). Please update the list and the example so they stay consistent.
Supported SDK connector names: `office365`, `office365users`, `onedriveforbusiness`, `sharepointonline`, `teams`, `msgraphgroupsanduser` (and any `Microsoft.Web/connections` connector name).
```powershell
$connectorName = "<connector-name>" # e.g., "office365", "onedriveforbusiness", "sharepointonline", "teams", "msgraphgroupsanduser"
$connectionName = "<connection-name>" # e.g., "office365-test", "sharepoint-test"
| /// Gets or sets the items in the current page. | ||
| /// </summary> | ||
| List<T> Value { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the link to the next page of results, or <c>null</c> if there are no more pages. | ||
| /// </summary> | ||
| string NextLink { get; set; } |
There was a problem hiding this comment.
NextLink is documented as optional (can be null) and ConnectorPageable already treats Value/NextLink as potentially null, but the interface declares both as non-nullable. This creates an incorrect contract under nullable reference types. Consider changing to List<T>? Value and string? NextLink (and adjusting the XML docs accordingly).
| /// Gets or sets the items in the current page. | |
| /// </summary> | |
| List<T> Value { get; set; } | |
| /// <summary> | |
| /// Gets or sets the link to the next page of results, or <c>null</c> if there are no more pages. | |
| /// </summary> | |
| string NextLink { get; set; } | |
| /// Gets or sets the items in the current page, or <c>null</c> if no items were provided. | |
| /// </summary> | |
| List<T>? Value { get; set; } | |
| /// <summary> | |
| /// Gets or sets the link to the next page of results, or <c>null</c> if there are no more pages. | |
| /// </summary> | |
| string? NextLink { get; set; } |
There was a problem hiding this comment.
Resolved — \IPageable.cs\ and \ConnectorPageable.cs\ have been removed from this PR. These types now come from #70 (merged), which already handles nullability correctly with \List? Value\ and \string? NextLink.
| public async IAsyncEnumerator<TItem> GetAsyncEnumerator(CancellationToken cancellationToken = default) | ||
| { | ||
| var page = await this._firstPageFunc(cancellationToken).ConfigureAwait(continueOnCapturedContext: false); | ||
|
|
||
| while (page != null) | ||
| { | ||
| if (page.Value != null) | ||
| { | ||
| foreach (var item in page.Value) | ||
| { | ||
| yield return item; | ||
| } | ||
| } | ||
|
|
||
| if (string.IsNullOrEmpty(page.NextLink)) | ||
| { | ||
| break; | ||
| } | ||
|
|
||
| page = await this._nextPageFunc(page.NextLink, cancellationToken).ConfigureAwait(continueOnCapturedContext: false); | ||
| } |
There was a problem hiding this comment.
ConnectorPageable introduces new auto-pagination behavior (following NextLink across pages), but there are no unit tests verifying multi-page enumeration (e.g., two pages with a NextLink, stop when NextLink is null/empty, and cancellation token propagation). Adding tests would help prevent regressions in paging across generated connectors.
There was a problem hiding this comment.
Resolved — \ConnectorPageable.cs\ has been removed from this PR. The pagination implementation (including multi-page enumeration, \AsPages(), cancellation token propagation) and 8 dedicated unit tests are provided by #70 (now merged on main).
| public static readonly string[] AvailableConnectors = [ | ||
| "azureloganalytics", | ||
| "kusto", | ||
| "msgraphgroupsanduser", | ||
| "office365", | ||
| "office365users", | ||
| "onedriveforbusiness", |
There was a problem hiding this comment.
azureloganalytics is now registered as an available connector, but there are no corresponding unit tests for AzureloganalyticsClient (unlike the other generated clients). To keep coverage consistent, add a test file similar to the other *ClientTests (constructor/null URL, dispose behavior, a mocked API call, and an error-path exception assertion).
There was a problem hiding this comment.
Acknowledged — \AzureloganalyticsClient\ tests will be added in a follow-up PR. The extension was included here because it was already shipping in the NuGet package but missing from source; adding it keeps source and package in sync. The office365users connector (the focus of this PR) has full test coverage.
90316ac to
48f8729
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 7 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
.github/skills/connection-setup/SKILL.md:72
- The supported connector names list and the example comment below it don’t reflect all connectors added/available in this PR. Since
azureloganalyticsis now registered inDirectClientConnectors.AvailableConnectors, it should be included here as a supported SDK connector name, and the example list should be updated to include the new connector names (e.g.,office365users,azureloganalytics).
Supported SDK connector names: `office365`, `office365users`, `onedriveforbusiness`, `sharepointonline`, `teams`, `msgraphgroupsanduser` (and any `Microsoft.Web/connections` connector name).
```powershell
$connectorName = "<connector-name>" # e.g., "office365", "onedriveforbusiness", "sharepointonline", "teams", "msgraphgroupsanduser"
$connectionName = "<connection-name>" # e.g., "office365-test", "sharepoint-test"
- Generated Office365usersExtensions.cs and AzureloganalyticsExtensions.cs via CodefulSdkGenerator - Updated ConnectorNames.cs and ManagedConnectors.cs (alphabetical order) - Added Office365usersClientTests.cs (12 tests: constructor, dispose, mocked API, error handling, serialization) - Updated README.md validated connectors table - Updated connection-setup skill connector list Depends on #70 for IPageable<T> and ConnectorPageable<TPage,TItem> pagination abstractions. Resolves #8
48f8729 to
6f55d6c
Compare
## Summary Add comprehensive unit tests and documentation for the **azureloganalytics** connector (Phase 3.2 - Azure Services). > **Note:** The generated code (\AzureloganalyticsExtensions.cs\), connector registration (\ConnectorNames.cs\, \ManagedConnectors.cs\), and pagination infrastructure (\IPageable.cs\, \ConnectorPageable.cs\) were merged to main as part of #70 and #75. This PR adds the remaining pieces. ## What's included ### Tests - 13 unit tests in \AzureloganalyticsClientTests.cs\: constructor, dispose, mocked API calls, error handling, serialization round-trips, multi-page pagination - All 167 tests pass (expanded from 145 baseline after #70 and #75 merged) ### Docs - Updated \README.md\ validated connectors table (added Azure Log Analytics with generated operations) - Updated connection-setup skill supported names list (added \�zureloganalytics\) ## E2E Validation Connection \�zureloganalytics-test\ created and consented on the \sdk-test-gateway\ Connector Gateway in \�razilsouth\. ## Merge sequencing This PR is now **ready to merge** — no remaining dependencies. Rebased onto main after #70 (pagination) and #75 (Office 365 Users) merged. Closes #8 Co-authored-by: Dobby <dobby@microsoft.com>
## Release 0.8.0-preview.1 Version bump and CHANGELOG update for the upcoming release. ### New in this release - **Office 365 Users** (\office365users\) — 12 operations (#75) - **Azure Log Analytics** (\�zureloganalytics\) — 4 operations (#74) - **SMTP** (\smtp\) — email sending (#76) - **Azure Blob Storage** (\�zureblob\) — file and container operations (#80) - **IBM MQ** (\mq\) — messaging queue operations (#81) - **OpenTelemetry instrumentation** — \ActivitySource\ tracing in \ConnectorHttpClient\ (#73) ### Release steps after merge 1. Tag: \git tag v0.8.0-preview.1 && git push origin v0.8.0-preview.1\ 2. Code mirror syncs to ADO (pipeline 1717) 3. Official build triggers on tag (pipeline 1718) 4. Queue release pipeline (1719) to publish to nuget.org
Summary
Adds the Office 365 Users (\office365users) connector client to the SDK, generated via CodefulSdkGenerator.
Changes
Generated code:
Registration:
Tests:
Docs:
E2E Validation
Resolves #8