Skip to content

[Enhancement] add Users command #259

@ceciliastevens

Description

@ceciliastevens

Summary

Code42 administrators occasionally need to manage users in bulk, and may not have SCIM providers or other methods. Even if SCIM is present, occasionally there are one-time cleanup jobs that would benefit from the bulk processing offered by the CLI, but not available in the web UI.

One way to address this need would be to add a users command that could accomplish tasks such as:

  • List users visible to the user running the CLI
  • List users who have a particular role
  • Add or remove a role from a user
  • List users by org
  • List users who are licensed
  • Bulk deactivate/reactivate users
  • Bulk change usernames
  • Bulk change organization
  • Bulk block/unblock

Proposed API

code42 users list --having-role "Customer Cloud Admin" --active-only --org-name "Example org" 
code42 users list --licensed --deactivated-only
code42 users bulk deactivate users_to_deactivate.csv
code42 users bulk block users_to_block.csv
code42 users bulk change-username users_to_rename.csv
code42 users bulk change-organization users_to_move.csv --target-org "Example org"

Intended Use Case

There are a variety of use-cases for this command:

  • Admins needing to do one-time cleanup or rename operations prior to introducing a SCIM provider
  • Admins needing to audit who has particular roles in their environment
  • Admins needing to determine who is consuming licenses and when
  • Building temporary user access controls (i.e. granting a role, and then removing it after 10 minutes)

These are just a few examples from the top of my head, doubtless more is possible in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions