Skip to content

Use indexed WorkOS lookup for admin user emails - #1578

Merged
RhysSullivan merged 1 commit into
UsefulSoftwareCo:mainfrom
maschwenk:fix/indexed-workos-admin-email
Aug 13, 2026
Merged

Use indexed WorkOS lookup for admin user emails#1578
RhysSullivan merged 1 commit into
UsefulSoftwareCo:mainfrom
maschwenk:fix/indexed-workos-admin-email

Conversation

@maschwenk

@maschwenk maschwenk commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • resolve cloud admin email filters with one WorkOS listUsers request scoped by both organization and normalized email
  • avoid listing every membership and fetching users sequentially in production
  • retain the membership-backed scan only for the configured test/dev WorkOS emulator, which does not expose the list-users route

Why

The reverse directory resolver currently lists every organization membership and calls getUser until it finds a matching email. Its latency therefore grows with organization size and the matching member's position. WorkOS accepts organizationId and email together, providing a single indexed lookup without weakening tenant isolation.

@RhysSullivan
RhysSullivan marked this pull request as ready for review August 13, 2026 07:09
@RhysSullivan
RhysSullivan merged commit a9365c1 into UsefulSoftwareCo:main Aug 13, 2026
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.

2 participants