Welcome to the new Box Support website. Check out all the details here on what’s changed.

Get User IDs using CLI

New post



  • Jason

    Hi  , hope you're doing well and welcome to the forum. Glad to see you're getting started with the CLI!


    To return a user ID from their email address (or even name), the argument you want to supply is --filter.


    $ box users --filter reba --fields id
    ----- User 700684617 -----
    Type: user
    ID: '700684617'

     For reference, the full description of this filter is:


    Search term to filter users on; matches prefixes of user name and login fields


    From https://github.com/box/boxcli/blob/master/docs/users.md


    Hope that helps!

    Comment actions Permalink
  • hsclater

    Thanks Jason

    Comment actions Permalink
  • kylehancock

    , please include this in the CLI documentation as an example for box users:get [ID].


    I would of had no way of knowing this without searching. In fact the CLI documentation needs be overhauled. It's one of the most unfriendly documentation for users. Even searching for filter help doesn't show this.

    Comment actions Permalink

Please sign in to leave a comment.