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

Get Enterprise ID from SDK

Answered
New post

Comments

2 comments

  • jcerise

    So, a little closer reading of the REST API docs was needed here. 

    A user object has an `enterprise` field, which is a small representation of the enterprise the user is a part of. This object contains an `id` field, which is the enterprise id I was looking for.

     

    Something like

    ```

    user_enterprise = client.user().get(fields=["enterprise"])

    enterprise_id = user_enterprise.enterprise.id

    ```

    accomplishes exactly what I needed. Hopefully this is helpful to someone in the future.

    0
    Comment actions Permalink
  • scottdodds

    Hi ,

     

    Thanks for posting the answer you found back to the community! Hopefully this will help other members who run into this challenge in the future.

     

    I'll also show your post to our dev docs team to see if they can find a way to make this easier to find in the documentation.

     

    Thanks again!

     

    -Scott

    0
    Comment actions Permalink

Please sign in to leave a comment.