Skip to content

feat: add client-grants organizations list command - #1599

Open
developerkunal wants to merge 1 commit into
feat/client-grants-commandsfrom
feat/client-grant-organizations
Open

feat: add client-grants organizations list command#1599
developerkunal wants to merge 1 commit into
feat/client-grants-commandsfrom
feat/client-grant-organizations

Conversation

@developerkunal

Copy link
Copy Markdown
Contributor

🔧 Changes

Adds a nested organizations command under client-grants to list the organizations associated with a client grant, backed by the get-client-grant-organizations endpoint (GET /client-grants/{id}/organizations).

  • New command auth0 client-grants organizations list [ls] <client-grant-id> with --number, --json, and --json-compact flags. When no id is passed, it falls back to the interactive client-grant picker.
  • New ClientGrantOrganizationAPIV3 interface (with generated mock) wrapping the v3 SDK ClientGrants.Organizations client, wired into APIV3.
  • New display renderer ClientGrantOrganizationList rendering an ID / Name / Display Name table, with an empty state when a grant has no organizations.
  • Adds the read:organization_client_grants scope to the device-login flow so interactively logged-in users can call the endpoint.
  • Includes the grant id in the client-grant picker label so grants that share an audience are distinguishable, and raises the client-grant picker page size to 100 so grants past the default first page of 50 remain selectable.

📚 References

Auth0 Management API: get-client-grant-organizations.

🔬 Testing

  • Unit tests cover the list command (populated table, empty state, API error wrapping, out-of-range number) and the updated picker label assertions.
  • Integration cases added for listing organizations and the invalid-number path.
  • Verified end to end against a live tenant: empty grant renders the empty state, a grant with an attached organization renders the table and JSON.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

Add a nested command under client-grants to list the organizations
associated with a client grant, backed by the get-client-grant-organizations
endpoint. Add the read:organization_client_grants scope to the login flow and
include the grant id in the client-grant picker so grants sharing an audience
are distinguishable.
@developerkunal
developerkunal requested a review from a team as a code owner August 6, 2026 07:22
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.

1 participant