NewWacht Bench is live — AI-assisted development for Wacht

listOrganizationRoles()

Returns organization roles scoped to one organization id.

Usage

The following example shows a basic usage of the backend client from @wacht/nextjs/server.

import { wachtClient } from '@wacht/nextjs/server';export async function listOrganizationRoles(organizationId: string) {  const client = await wachtClient();  return client.organizations.listOrganizationRoles(organizationId);}

Signature

function listOrganizationRoles(  organizationId: string,): Promise<PaginatedResponse<OrganizationRole>>

Parameters

organizationId?: string | undefined;
Target organization id.

Return value

data?: OrganizationRole[] | undefined;
Organization roles in this organization.
total?: number | undefined;
Total number of organization roles matching the current query.
limit?: number | undefined;
Effective page size from backend response.
offset?: number | undefined;
Effective page offset from backend response.

Behavior

  • Operates on organization-scoped role definitions.
  • Use pagination and filters from this method to build admin list views.

On this page