Skip to main content

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

  • July 14, 2023
  • 1 reply
  • 185 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
  • 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"
    }
}