Skip to content

Generated clients lack pagination support (@odata.nextLink) #58

@daviburg

Description

@daviburg

Summary

The generated DirectClient typed clients do not support paginated responses. Operations that return paged collections (e.g., ListUsersAsync on MsgraphgroupsanduserClient) return only the first page with no way to follow @odata.nextLink for subsequent pages.

Affected Connectors

All connectors with list/search operations that return paged OData responses:

  • MS Graph Groups & Users: ListUsersAsync, ListGroupsByDisplayNameSearchAsync, ListDirectGroupMembersAsync
  • Office365: email listing operations
  • SharePoint: list/folder operations
  • Teams: GetAllTeamsAsync, GetChannelsForGroupAsync, GetMessagesFromChannelAsync

Current Behavior

The generated ListUsersResponse type includes @odata.context and value but does not include an @odata.nextLink property. The CallConnectorAsync<T> method deserializes the response into the typed model, discarding any nextLink that may be present in the JSON.

Example response from the connector:
json { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users", "@odata.nextLink": "https://graph.microsoft.com/v1.0/users?$skiptoken=...", "value": [...] }

The @odata.nextLink field is silently lost during deserialization.

Expected Behavior

The SDK should support pagination in one or more of these ways:

  1. Include nextLink in response types — Add an @odata.nextLink property to all list response types so callers can detect when more pages exist
  2. Provide a follow-up method — e.g., GetNextPageAsync<T>(nextLink) on the client that accepts a nextLink URL and returns the next page with the same typed response
  3. Provide an async enumerable — e.g., ListUsersPagedAsync() that yields all pages automatically

Root Cause

The BPM CodefulSdkGenerator does not emit @odata.nextLink properties in the generated response POCOs, and the CallConnectorAsync<T> helper does not preserve unmodeled JSON properties.

Impact

Without pagination support, the connector is limited to the first page of results (typically 100 items). This makes the connector unsuitable for production scenarios with large datasets. The connector should not be considered fully supported until this is resolved.

Workaround

None — callers cannot access nextLink through the typed client. The only option is to make raw HTTP calls outside the generated client.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions