Skip to main content

Is there a way i can derive enterprise id from access token?

  • July 14, 2023
  • 1 reply
  • 167 views

I wanted to derive enterprise id from access token. For example, in salesforce we can derive orgid from access token.

1 reply

pchristensen Box
  • Senior Staff Platform Solutions Engineer
  • 17 replies
  • July 17, 2023

Hi

There is nothing directly in the access token that will let you derive the enterprise ID. I think your best bet is to use the users/me endpoint


https://api.box.com/2.0/users/me?fields=enterprise should return something like


{

    "type": "user",

    "id": "13110169300",

    "enterprise": {

        "type": "enterprise",

        "id": "57767591",

        "name": "Peter's Demo Account"

    }

}


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings