Skip to main content
Question

Issues with retrieving users with a service account

  • May 22, 2025
  • 4 replies
  • 8 views

Forum|alt.badge.img

I'm trying to use a service account to retrieve users using the /users endpoint from my enterprise but I keep getting "access_denied_insufficient_permissions". I created a new service account and tried again but got the same error. If I use the enterprise when creating my JWT, I do not get that error, but only my two previously created service accounts are returned and not any of the other users. Even if I use the "filter_term" or "login" parameters, the same two service accounts are returned. Am I doing something wrong?

4 replies

Forum|alt.badge.img

In your developer console, go to your app and enable "Configuration => Application Access => Enterprise". By default, a JWT app only has access to the service account and accounts created by the app.


Forum|alt.badge.img

I went into my app and switched the access to "Enterprise", generated a new access token and attempted to return the users again with the same results. It only returns my two service accounts. Is there anything else I need to do? I am creating my JWT as box_sub_type of enterprise and my enterprise id.


Forum|alt.badge.img

Hello, 

 

Did you reauthorize your application in the admin console? That must be done anytime you make a change on the configuration page of the developer console in order for the changes to take effect. 

 

Best, 


Forum|alt.badge.img

That fixed it. Thanks!