Manage users in your Astro Workspace
As a Workspace Owner or an Organization Owner, you can add new team members to Astro and grant them user roles with permissions for specific actions across your Workspace.
To manage users at the Organization level, see Manage Organization users. To manage groups of users, see Manage Teams.
Prerequisites
To add, edit, or remove Workspace users from a given Workspace, you need either Organization Owner permissions or Workspace Owner permissions for the Workspace.
Centralized access management for Organization Owners
Organization Owners can also add or update a user or Team for a Workspace from the Organization Settings:
- In the Astro UI, click Organization Settings > Access Management.
- Select the user or team to add or update.
- Click the Workspaces tab, then click + Workspace to add them to a Workspace, or open the More actions menu (⋯) and select Edit role next to an existing Workspace to change their role.
Add a user to a Workspace
-
In the Astro UI, click Workspace Settings > Access Management.
-
In the Users tab, click + Member.
-
Select the user’s name and email address in the Organization Member list.
-
Select a role for the user and then click Add member. See Workspace roles reference.
After you add the user, their information appears in the Users tab as a new entry in the Members list.
You can also add groups of users to a Workspace through Teams. See Manage Teams.
Update or remove a Workspace user
-
In the Astro UI, go to Workspace Settings > Access Management.
-
Find the user in the Users list. To view or manage the user’s roles, either click the user’s row to open the User Details page, or click the More actions button on the user’s row and select Edit User.
-
(Optional) Edit the user’s name and role. See Workspace roles.
-
If you’ve updated the user’s role, click Update member. To delete the user, open the action menu and select Remove user…, or click Remove member on the User Details page.
Add a group of users to a Workspace using the Astro CLI
You can use the Astro CLI and a shell script to add multiple users to a Workspace at once. The shell script reads from a text file which contains user information. You can generate a text file for each new batch of users that need to be assigned to a Workspace and run the script with the Astro CLI.
-
Create a text file named
users.txt. -
Open the text file. On each line, add a user’s email and their role separated by a space. The following is an example of how you can write a list for inviting users to a Workspace:
-
Create a file named
add-users.shand add the following script to it: -
Log in to the Astro CLI using
astro login, then runastro workspace listto ensure that you’re in the same Workspace where you want to add the users. If you’re not in the right Workspace, runastro workspace switch. -
Run the following command to execute the shell script:
-
(Optional) To use this script as part of a CI/CD pipeline, create an Organization API token or Workspace API token and specify the environment variable
ASTRO_API_TOKEN=<your-token>in your CI/CD environment. Note that you can use Workspace API tokens to manage users only at the Workspace level.