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

Get user role (admin, co-admin, user) from Python SDK

Answered
New post

Comments

2 comments

  • mwiller

     The `role` field is not returned from the API by default; if you want to request it, you can do so using the `fields` parameter of `get()` like this:

     

    client.user().get(fields=['id', 'name', 'login', 'role'])

    Note that when you specify fields, you will need to specify every field you need.  If you just specify `role`, you won't get any of the normal user fields back from the API.

    0
    Comment actions Permalink
  • jcerise

    Yup, that looks to be what I'm looking for, thanks!

    0
    Comment actions Permalink

Please sign in to leave a comment.