Repository navigation
feat(directory-sync): Add directory-scoped user and group reads - #1759
Merged
Merged
Conversation
Add listDirectoryUsers, getDirectoryUser, listDirectoryGroups and
getDirectoryGroup for the GET /directories/{directoryId}/users and
/groups routes, and mark the flat listUsers, getUser, listGroups and
getGroup deprecated in favor of them. The scoped user reads return the
slim DirectoryUser without the groups array.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryAdds four directory-scoped methods for reading Directory Sync users and groups.
Acknowledged by
|
gjtorikian
approved these changes
Nov 12, 2026
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.
Description
The API now serves directory-scoped Directory Sync reads (workos/workos#69425, live in production since 2026-11-11) as the successor to the flat
/directory_usersand/directory_groupsroutes, which are rate limited because every user carries an unboundedgroupsarray. The published docs already show these SDK method names, so this adds them:directorySync.listDirectoryUsers({ directoryId, group?, idpId?, email?, ...pagination })→GET /directories/{directoryId}/usersdirectorySync.getDirectoryUser({ directoryId, userId })→GET /directories/{directoryId}/users/{userId}directorySync.listDirectoryGroups({ directoryId, user?, ...pagination })→GET /directories/{directoryId}/groupsdirectorySync.getDirectoryGroup({ directoryId, groupId })→GET /directories/{directoryId}/groups/{groupId}The user reads return the slim
DirectoryUser(nogroups), which is the whole point of the new routes.listUsers,getUser,listGroupsandgetGroupare marked@deprecatedpointing at the replacements; they keep working.Everything hand-owned lives inside
@oagen-ignoreregions so regeneration preserves it. The@deprecatedtags onlistGroupsandgetGroupsit in generated code; the OpenAPI spec marks those operations deprecated, so a regen should carry them (worth checking on the next oagen run).Specs cover the wire path for each method (including
idpId→idp_idand undefined filters being dropped), path-segment encoding ofdirectoryId, the slim response shape, and error propagation. Not exercised against the live API from this branch; the request shape matchesDirectoriesUsersController/DirectoriesGroupsControlleronworkos/workosmain.Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
Already done: the reference pages and Node snippets for these methods shipped in workos/workos#69425.
🤖 Generated with Claude Code