Skip to main content
Question

Exception raised when get AdminToken

  • May 22, 2025
  • 7 replies
  • 30 views

Forum|alt.badge.img

I use code from SDK example:
var boxConfig = new BoxConfig(CLIENT_ID, CLIENT_SECRET, ENTERPRISE_ID, privateKey, JWT_PRIVATE_KEY_PASSWORD, JWT_PUBLIC_KEY_ID);
var boxJWT = new BoxJWTAuth(boxConfig);
var adminToken = boxJWT.AdminToken();

This code - boxJWT.AdminToken() - raise an exception
Additional information: {"error":"unauthorized_client","error_description":"This app is not authorized by the enterprise admin"}

 

What I doing wrong?

7 replies

Forum|alt.badge.img

I'm having the same error...

 

Have you solved it?


Forum|alt.badge.img

The problem is that you must grant access since bussiness config.

Follow this: https://box-content.readme.io/v2.0/docs/app-auth

And this: https://box-content.readme.io/v2.0/docs/connecting-your-developer-enterprise

 

 


Forum|alt.badge.img

After you correctly require 2 way authentication and have all your permissions set correctly, you will then need to delete your existing authornization and re-authorize. if you do not do this, you'll continue to get the annoying error. 


Forum|alt.badge.img

and how does one delete all of the exsiting authorization? Do I have to delete all information that was entered before and re-enter everything or just delete all of the previous information? More details about what to do would be very helpfull.

 

Thanks


Forum|alt.badge.img
  1. Go to https://app.box.com/master/settings/openbox
  2. Find "Custom Applications" box and click "Authorize new app"
  3. Insert your ClientId as API code

And do not delete anything from your account as it mentioned in comments above =).

 


Forum|alt.badge.img

I have my app authorised by admin and still getting "This app is not authorized by the enterprise admin"


Forum|alt.badge.img

It seems like this feature has gone.