Newer Version Available

This content describes an older version of this product. View Latest

Create a Scratch Org User

Although scratch orgs were designed to be used by one developer, sometimes you need other users to test with different profiles and permission sets.

Use the org create user command to create a user. Specify the --set-alias flag to assign a simple name to the user that you can reference in later CLI commands. When the command completes, it outputs the new username and user ID.

Users are associated with a specific scratch org. Specify the scratch org username or alias at the command line with the --target-org flag if it isn’t already set as the default. If you try to create a user for a non-scratch org, the org create user command fails.

You can customize the new user by creating a definition file and specifying it with the --definition-file flag.

View the list of users associated with a scratch org with the org list users command. The (A) on the left identifies the administrator user that was created when the scratch org was created.

Display details about a user with the org display user command.