Skip to content

Users Commands

users

View and manage users and user roles.

Usage:

users [OPTIONS] COMMAND [ARGS]...

Options:

  --log-stderr      Enable logging to stderr.
  --log-file TEXT   Specify file path to write log output to.
  --log-level TEXT  Set level for Incydr client logging.
  --help            Show this message and exit.

users activate

Activate a user.

Usage:

users activate [OPTIONS] USER

Options:

  --log-stderr      Enable logging to stderr.
  --log-file TEXT   Specify file path to write log output to.
  --log-level TEXT  Set level for Incydr client logging.
  --help            Show this message and exit.

users bulk-activate

Bulk activate users.

Takes a single arg FILE which specifies the path to the file (use "-" to read from stdin).

File format can either be CSV or JSON Lines format (Default is CSV).

Requires a single user column or field that contains either the user IDs or the usernames of the users to be activated.

Usage:

users bulk-activate [OPTIONS] FILE

Options:

  -f, --format [csv|json-lines]  Specify format of input file: 'csv' or 'json-
                                 lines'.  Defaults to 'csv'.
  --log-stderr                   Enable logging to stderr.
  --log-file TEXT                Specify file path to write log output to.
  --log-level TEXT               Set level for Incydr client logging.
  --help                         Show this message and exit.

users bulk-deactivate

Bulk deactivate users.

Takes a single arg FILE which specifies the path to the file (use "-" to read from stdin).

File format can either be CSV or JSON Lines format (Default is CSV).

Requires a single user column or field that contains either the user IDs or the usernames of the users to be deactivated.

Usage:

users bulk-deactivate [OPTIONS] FILE

Options:

  -f, --format [csv|json-lines]  Specify format of input file: 'csv' or 'json-
                                 lines'.  Defaults to 'csv'.
  --log-stderr                   Enable logging to stderr.
  --log-file TEXT                Specify file path to write log output to.
  --log-level TEXT               Set level for Incydr client logging.
  --help                         Show this message and exit.

users bulk-move

Bulk move multiple users to specified organizations.

Takes a single arg FILE which specifies the path to the file (use "-" to read from stdin).

File format can either be CSV or JSON Lines format (Default is CSV).

Requires the following columns:

  • user - User ID or username of the user who will be moved to the new organization. Performs an additional lookup if username is passed.
  • org_guid - GUID for the user's new organization.

Usage:

users bulk-move [OPTIONS] FILE

Options:

  -f, --format [csv|json-lines]  Specify format of input file: 'csv' or 'json-
                                 lines'.  Defaults to 'csv'.
  --log-stderr                   Enable logging to stderr.
  --log-file TEXT                Specify file path to write log output to.
  --log-level TEXT               Set level for Incydr client logging.
  --help                         Show this message and exit.

users bulk-update-roles

Bulk update roles associated with multiple users from a file.

By default, the provided roles will replace the specified user's existing roles. Use the --add flag or the --remove flag to add or remove roles, respectively, from a user's existing roles.

Takes a single arg FILE which specifies the path to the file (use "-" to read from stdin).

File format can either be CSV or JSON Lines format (Default is CSV).

Requires the following CSV columns or JSON keys:

  • user - User ID or username of the user whose roles will be updated. Performs an additional lookup if username is passed.
  • role - Role ID and/or role name (case-sensitive) to assign to the new user.

Example:

The following command will add roles to users as specified in a JSON-lines formatted file:

    incydr users bulk-update-roles path/to/file.json --add --format json-lines

Usage:

users bulk-update-roles [OPTIONS] FILE

Options:

  -f, --format [csv|json-lines]  Specify format of input file: 'csv' or 'json-
                                 lines'.  Defaults to 'csv'.
  --add
  --remove
  --log-stderr                   Enable logging to stderr.
  --log-file TEXT                Specify file path to write log output to.
  --log-level TEXT               Set level for Incydr client logging.
  --help                         Show this message and exit.

users deactivate

Deactivate a user.

Usage:

users deactivate [OPTIONS] USER

Options:

  --log-stderr      Enable logging to stderr.
  --log-file TEXT   Specify file path to write log output to.
  --log-level TEXT  Set level for Incydr client logging.
  --help            Show this message and exit.

users list

List users.

Usage:

users list [OPTIONS]

Options:

  --active / --inactive     Filter by active or inactive users. Defaults to
                            returning both when when neither option is passed.
  --blocked / --unblocked   Filter by blocked or unblocked users. Defaults to
                            returning both when when neither option is passed.
  --username TEXT
  -f, --format TABLEFORMAT  Format to print result. One of 'table', 'json-
                            pretty', 'json-lines', or 'csv. If environment has
                            INCYDR_USE_RICH=false set, defaults to 'json-
                            lines', else defaults to 'table'.
  --columns TEXT            Comma-delimited string of column names. Nested
                            values should be specified in dot-notation. Limits
                            output to contain only the specified columns in
                            CSV or Table format.  Ignored for JSON output
                            formats.
  --log-stderr              Enable logging to stderr.
  --log-file TEXT           Specify file path to write log output to.
  --log-level TEXT          Set level for Incydr client logging.
  --help                    Show this message and exit.

users list-devices

List devices associated with a particular user.

Usage:

users list-devices [OPTIONS] USER

Options:

  -f, --format TABLEFORMAT  Format to print result. One of 'table', 'json-
                            pretty', 'json-lines', or 'csv. If environment has
                            INCYDR_USE_RICH=false set, defaults to 'json-
                            lines', else defaults to 'table'.
  --columns TEXT            Comma-delimited string of column names. Nested
                            values should be specified in dot-notation. Limits
                            output to contain only the specified columns in
                            CSV or Table format.  Ignored for JSON output
                            formats.
  --log-stderr              Enable logging to stderr.
  --log-file TEXT           Specify file path to write log output to.
  --log-level TEXT          Set level for Incydr client logging.
  --help                    Show this message and exit.

users list-roles

List roles associated with a particular user.

Usage:

users list-roles [OPTIONS] USER

Options:

  -f, --format TABLEFORMAT  Format to print result. One of 'table', 'json-
                            pretty', 'json-lines', or 'csv. If environment has
                            INCYDR_USE_RICH=false set, defaults to 'json-
                            lines', else defaults to 'table'.
  --columns TEXT            Comma-delimited string of column names. Nested
                            values should be specified in dot-notation. Limits
                            output to contain only the specified columns in
                            CSV or Table format.  Ignored for JSON output
                            formats.
  --log-stderr              Enable logging to stderr.
  --log-file TEXT           Specify file path to write log output to.
  --log-level TEXT          Set level for Incydr client logging.
  --help                    Show this message and exit.

users move

Move a user to a specified organization.

Usage:

users move [OPTIONS] USER ORG_GUID

Options:

  --log-stderr      Enable logging to stderr.
  --log-file TEXT   Specify file path to write log output to.
  --log-level TEXT  Set level for Incydr client logging.
  --help            Show this message and exit.

users roles

View available roles.

Usage:

users roles [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.

users roles list

List all available roles that can be assigned by the current user.

Usage:

users roles list [OPTIONS]

Options:

  -f, --format TABLEFORMAT  Format to print result. One of 'table', 'json-
                            pretty', 'json-lines', or 'csv. If environment has
                            INCYDR_USE_RICH=false set, defaults to 'json-
                            lines', else defaults to 'table'.
  --log-stderr              Enable logging to stderr.
  --log-file TEXT           Specify file path to write log output to.
  --log-level TEXT          Set level for Incydr client logging.
  --help                    Show this message and exit.

users roles show

Show details for a single role, specified by role name or role ID.

Usage:

users roles show [OPTIONS] ROLE

Options:

  -f, --format SINGLEFORMAT  Format to print result. One of 'rich', 'json-
                             pretty', or 'json-lines'. If environment has
                             INCYDR_USE_RICH=false set, defaults to 'json-
                             lines', else defaults to 'rich'.
  --log-stderr               Enable logging to stderr.
  --log-file TEXT            Specify file path to write log output to.
  --log-level TEXT           Set level for Incydr client logging.
  --help                     Show this message and exit.

users show

Show details for a user.

Accepts a user ID or a username. Performs an additional lookup if username is passed.

Usage:

users show [OPTIONS] USER

Options:

  -f, --format SINGLEFORMAT  Format to print result. One of 'rich', 'json-
                             pretty', or 'json-lines'. If environment has
                             INCYDR_USE_RICH=false set, defaults to 'json-
                             lines', else defaults to 'rich'.
  --log-stderr               Enable logging to stderr.
  --log-file TEXT            Specify file path to write log output to.
  --log-level TEXT           Set level for Incydr client logging.
  --help                     Show this message and exit.

users update-roles

Update roles associated with a particular user.

Usage: users update-roles USER ROLES

USER is the user ID or username of the user whose roles will be updated. Performs an additional lookup if username is passed.

ROLES is a comma-delimited list of role IDs and/or role names to replace that user's roles.

Use the --remove flag to remove the specified role(s) from a user's existing roles.

Alternatively, use the --add flag to assign additional roles to a user's existing roles.

Usage:

users update-roles [OPTIONS] USER ROLES

Options:

  --add
  --remove
  --log-stderr      Enable logging to stderr.
  --log-file TEXT   Specify file path to write log output to.
  --log-level TEXT  Set level for Incydr client logging.
  --help            Show this message and exit.