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.

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 risk-profiles

View and manage user risk profiles.

Usage:

users risk-profiles [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 risk-profiles add-cloud-alias

Add a cloud alias to a user risk profile.

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

A cloud alias is the username an employee uses to access cloud services such as Google Drive or Box. Adding a cloud alias allows Incydr to link a user's cloud activity with their Code42 username. Each user has a default cloud alias of their Code42 username. You can add one additional alias.

Usage:

users risk-profiles add-cloud-alias [OPTIONS] USER CLOUD_ALIAS

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 risk-profiles bulk-add-cloud-aliases

Bulk add cloud aliases to user risk profiles.

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).

Required CSV columns:

  • user - User ID or username of the user risk profile. Performs an additional lookup if username is passed.
  • cloud_alias - The cloud alias to remove from the profile.

Usage:

users risk-profiles bulk-add-cloud-aliases [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 risk-profiles bulk-remove-cloud-aliases

Bulk remove cloud aliases from user risk profiles.

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).

Required CSV columns:

  • user - User ID or username of the user risk profile. Performs an additional lookup if username is passed.
  • cloud_alias - The cloud alias to remove from the profile.

Usage:

users risk-profiles bulk-remove-cloud-aliases [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 risk-profiles list

List user risk profiles.

Usage:

users risk-profiles 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'.
  --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.
  --support-user / --non-support-user
                                  Filter by support users or non-support
                                  users. Defaults to returning both when when
                                  neither option is passed.
  --deleted / --non-deleted       Filter by deleted or non-deleted users.
                                  Defaults to returning both when when neither
                                  option is passed.
  --active / --inactive           Filter by active or inactive users. Defaults
                                  to returning both when when neither option
                                  is passed.
  --locality TEXT                 Filter by locality (city).
  --region TEXT                   Filter by region (state).
  --country TEXT                  Filter by country.
  --employment-type TEXT          Filter by employment type.
  --department TEXT               Filter by department.
  --division TEXT                 Filter by division.
  --title TEXT                    Filter by job title.
  --manager TEXT                  Filter by manager.  Accepts a manager's user
                                  ID or username, performs an additional
                                  lookup if a username is passed.
  --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 risk-profiles remove-cloud-alias

Remove a cloud alias from a user risk profile.

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

Usage:

users risk-profiles remove-cloud-alias [OPTIONS] USER CLOUD_ALIAS

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 risk-profiles show

Show details for a user risk profile.

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

Usage:

users risk-profiles 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 risk-profiles update

Update a user risk profile.

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

Usage:

users risk-profiles update [OPTIONS] USER

Options:

  --start-date TEXT   Update a user's starting date. Accepts a date in yyyy-
                      MM-dd (UTC) format.
  --end-date TEXT     Update a user's departure date. Accepts a date in yyyy-
                      MM-dd (UTC) format.
  --notes TEXT        Update the optional notes on a user's profile.
  --clear-start-date  Clear the start date on a user's profile. Incompatible
                      with --start-date.
  --clear-end-date    Clear the end date on a user's profile. Incompatible
                      with --end-date.
  --clear-notes       Clear the notes on a user's profile. Incompatible with
                      --notes.
  --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.