Switching Organization on the CLI

Onboardbase allows users to manage multiple organizations within a single account. When utilizing the onboardbase setup command, users may need to switch between different organizations.

CLI Logins are Scoped to an Organization on Onboardbase

When you are using the CLI, you are required to log in (by running onboardbase login) before you can access your resources on Onboardbase. Logins from the CLI are scoped to a specific organization on Onboardbase.

When you log in from the CLI, you will be required to select an organization from which you want to access resources.

Local Directory vs Global Scoped CLI Login

When you run onboardbase login from the CLI, you will have to scope the login to either of the following:

  • Current Directory: This option only restricts the login details to the current directory.
  • Global Login: This option allows the login details to be used globally (from any directory in your machine).

After selecting an option, you will be prompted to open the login URL in your browser.

If login is scoped to only the current directory, that means you can access the resources from the organization you selected during the login process when you run onboardbase CLI commands from that directory only.

On the other hand, if you do global login, you can access the resources from the organization you selected. After selecting an option, you will be prompted to open the login URL in your browser from any folder in your machine (provided the folder does not have an existing local login).

Switching Organizations

Ideally, you are expected to scope the login to a particular organization to a folder only. You cannot log in to multiple organizations within a folder (project directory).

However, if you need to switch organization within a folder for any reason, you will need to re-authenticate by running onboardbase login

After choosing an option, answer yes to the prompt that asks if the auth link should be opened in the browser. A new browser tab will open to facilitate the login process.

After providing an email address, an authentication URL will be sent to you via an email message. Click on the link, and you will be able to choose the organization for which you want to access.

Running onboardbase setup

Now that you have successfully logged in and selected the organization, you can proceed to run the onboardbase setup command.

The projects associated with the chosen organization will be visible during the setup process.