Skip to Content
Clerk logo

Clerk Docs

Ctrl + K
Go to clerk.com

getOrganization()

Retrieves a single organization by the organization ID, if the ID is valid. Throws an error if the organization ID is invalid.

const organizationId = 'my-organization-id'; const organization = await clerkClient.organizations.getOrganization({ organizationId });

GetOrganizationParams

NameTypeDescription
organizationId | slugstringThe ID of the organization to retrieve, or the slug of the organization to retrieve.

Example

getOrganization(slug)

Retrieve an organization by its slug instead of its ID.

const slug = 'my-organization-slug'; const organization = await clerkClient.organizations.getOrganization({ slug });

Last updated on August 16, 2023

What did you think of this content?

Clerk © 2024