> ## Documentation Index
> Fetch the complete documentation index at: https://astronomer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# astro workspace team add

<Info>The behavior and format of this command differs depending on what Astronomer product you're using. Use the following tabs to change between product contexts.</Info>

Add a Team to your current Workspace and grant it a Workspace role.

<Tabs>
  <Tab title="Astro">
    ## Usage

    ```sh wrap theme={null}
    astro workspace team add <options>
    ```

    If you run the command with no options specified, the CLI lists Teams in your Organization and prompts you to select one. It then adds the Team to your current Workspace with the Workspace Member role.

    To add a Team to a specific Workspace, specify the Workspace using the `--workspace-id` flag. To find a Workspace ID, run `astro workspace list`.

    #### Options

    | Option           | Description                                                               | Valid Values                                                                                                                                                 |
    | ---------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
    | `--team-id`      | The ID for the Team to add to a Workspace. Bypasses the selection prompt. | Any valid Team ID. You can find available Team ID's by running `astro organization team list`.                                                               |
    | `-r`, `--role`   | The Team's role in the Workspace.                                         | Possible values are `WORKSPACE_ACCESSOR`, `WORKSPACE_MEMBER`, `WORKSPACE_AUTHOR`, `WORKSPACE_OPERATOR`, or `WORKSPACE_OWNER`. Default is `WORKSPACE_MEMBER`. |
    | `--workspace-id` | The ID for the Workspace where you want to add the Team.                  | Any valid Workspace ID. Default is the current Workspace context you are working in.                                                                         |
  </Tab>

  <Tab title="APC">
    Manage Astro Private Cloud [Teams](https://www.astronomer.io/docs/software/import-idp-groups).

    ## Usage

    If you want to add a team to the current Workspace with the default role of Workspace Member, you can run `astro workspace team add <team-id>`, with the team ID that you want to add.

    ```sh wrap theme={null}
    astro workspace team add <team-id>
    ```

    You can retrieve a Team's ID in one of two ways:

    * Access the Team in the UI and copy the last part of the URL in your web browser. For example, if your Team is located at `BASEDOMAIN.astronomer.io/w/cx897fds98csdcsdafasdot8g7/team/cl4iqjamcnmfgigl4852flfgulye`, your Team ID would be `cl4iqjamcnmfgigl4852flfgulye`.
    * Run `astro organization team list` and copy the value in the ID column

    #### Options

    | Option                   | Description                       | Possible Values                                                                                                                        |
    | ------------------------ | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
    | `<team-id>` (*Required*) | The Team's ID                     | Any valid Team ID                                                                                                                      |
    | `--role`                 | The Team's role in the Workspace. | Possible values are `WORKSPACE_MEMBER`, `WORKSPACE_AUTHOR`, `WORKSPACE_OPERATOR`, or `WORKSPACE_OWNER`. Default is `WORKSPACE_MEMBER`. |
  </Tab>
</Tabs>

## Related commands

* [`astro workspace team remove`](/docs/cli/v1.39/astro-workspace-team-remove)
* [`astro organization team create`](/docs/cli/v1.39/astro-organization-team-create)
* [`astro workspace switch`](/docs/cli/v1.39/astro-workspace-switch)
