Skip to content

Add Office 365 Users connector client#75

Merged
daviburg merged 1 commit into
mainfrom
feature/office365users-connector
Apr 30, 2026
Merged

Add Office 365 Users connector client#75
daviburg merged 1 commit into
mainfrom
feature/office365users-connector

Conversation

@daviburg
Copy link
Copy Markdown
Member

@daviburg daviburg commented Apr 30, 2026

Summary

Adds the Office 365 Users (\office365users) connector client to the SDK, generated via CodefulSdkGenerator.

Changes

Generated code:

  • \Office365usersExtensions.cs\ — typed client with 12 operations: MyProfile, UserProfile, Manager, DirectReports, SearchUser, RelevantPeople, TrendingDocuments, UserPhoto, UpdateMyProfile, UpdateMyPhoto, HttpRequest
  • \AzureloganalyticsExtensions.cs\ — also generated (was missing from source, already in NuGet package)

Registration:

  • Updated \ConnectorNames.cs\ and \ManagedConnectors.cs\ (alphabetical order)

Tests:

  • 12 new tests in \Office365usersClientTests.cs: constructor, dispose, mocked API (MyProfile, UserProfile, Manager, DirectReports), error handling, serialization round-trips (GraphUser, User, Person), IPageable interface verification
  • All 152 tests pass (0 failures, includes 8 pagination tests from Add IAsyncEnumerable pagination support (#58) #70)

Docs:

  • Updated README validated connectors table
  • Updated connection-setup skill connector list

E2E Validation

Resolves #8

Copilot AI review requested due to automatic review settings April 30, 2026 01:35
@daviburg daviburg requested a review from a team as a code owner April 30, 2026 01:35
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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: Office365usersClient and AzureloganalyticsClient.
  • 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 (missing azureloganalytics). Also, the $connectorName example comment still omits the newly added office365users (and would need azureloganalytics too 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"

Comment on lines +16 to +23
/// 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; }
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
/// 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; }

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

Comment on lines +49 to +69
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);
}
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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).

Comment on lines 33 to 39
public static readonly string[] AvailableConnectors = [
"azureloganalytics",
"kusto",
"msgraphgroupsanduser",
"office365",
"office365users",
"onedriveforbusiness",
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

@daviburg daviburg self-assigned this Apr 30, 2026
@daviburg daviburg force-pushed the feature/office365users-connector branch 2 times, most recently from 90316ac to 48f8729 Compare April 30, 2026 23:00
Copilot AI review requested due to automatic review settings April 30, 2026 23:00
Copy link
Copy Markdown

Copilot AI left a comment

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 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 azureloganalytics is now registered in DirectClientConnectors.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
@daviburg daviburg force-pushed the feature/office365users-connector branch from 48f8729 to 6f55d6c Compare April 30, 2026 23:08
@daviburg daviburg merged commit 5e48b4e into main Apr 30, 2026
10 checks passed
@daviburg daviburg deleted the feature/office365users-connector branch April 30, 2026 23:28
daviburg added a commit that referenced this pull request May 1, 2026
## 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>
daviburg added a commit that referenced this pull request May 1, 2026
## 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
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.

Generate additional connector packages beyond Office 365 Outlook and SharePoint

2 participants