getOrganization()
Retrieves a single organization by the organization ID, if the ID is valid, or by the organization slug.
const organizationId = 'my-organization-id';
const organization = await clerkClient.organizations.getOrganization({
organizationId
});
GetOrganizationParams
Name | Type | Description |
---|---|---|
organizationId | slug | string | The ID of the organization to retrieve, or the slug of the organization to retrieve. |
Example
getOrganization( { slug })
Retrieve an organization by its slug.
const organizationSlug = 'my-organization-slug';
const organization = await clerkClient.organizations.getOrganization({
slug: organizationSlug
});