Skip to main content

Organization switcher

In the organization experience, users may switch between organizations. Each time they switch, the app fetches a new organization token to load the relevant information.

Organization switcher

How to implement it

  1. Create a dropdown or similar UI component to list all organizations available to the user.
  2. When the user selects a different organization, get its ID and call the SDK method getOrganizationToken(organizationId) to fetch the corresponding organization token. (The SDK handles token caching for you.)
  3. Store the selected organization ID (in the URL or client storage), and always use it to fetch the paired organization token for organization-specific resources.