Skip to Content
Clerk logo

Clerk Docs

Ctrl + K
Go to clerkstage.dev

updateOrganizationMembership()

Updates a user's organization membership parameters.

const organizationId = 'my-organization-id';
 
const userId = 'my-user-id';
 
const role = 'role-to-assign-user';
 
const organization = await clerkClient.organizations.updateOrganizationMembership({organizationId, userId, role});

UpdateOrganizationMembershipParams

NameTypeDescription
organizationIdstringThe organization ID of the organization a user is being added to.
userIdstringThe user ID of the user being added to the organization.
roleOrganizationMembershipRoleThe role to assign the added user within the organization.

Was this helpful?

Clerk © 2023