Skip to main content
Question

Get external user returns 403

  • May 21, 2025
  • 4 replies
  • 8 views

Forum|alt.badge.img

Hi,

I want to be able to see both my managed and external usera from my box application. I have retrieved the enterprise token and when I try to call the method getAllEnterpriseOrExternalUsers box returns 403, saying the permissions are not high enough. When I try to get only the managed users, everything works as expected.

Do you have any idea what might be the problem? Why can't I use the enterprise token get the external users?

Also, why the method getAllEnterpriaeUsers retrieve the users that I have invited into my enterprise? The method only returns the users I have aprogramatically added into my enterprise.
Tx

4 replies

Forum|alt.badge.img

 In the Scopes section for your application in the Box developer console, do you have the "Manage users" box checked? 


Forum|alt.badge.img

, yes, it is checked 😞


Forum|alt.badge.img

We also have exact the same problem, when we call getExternalUsers method  - got an error

 

!MESSAGE The API returned an error code: 403
{"type":"error","status":403,"code":"access_denied_insufficient_permissions","help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Access denied - insufficient permission","request_id":"***number removed for privacy***59c9ed0094592"}

 

But if we call getAllEnterpriseUsers - all works fine. Please need an advice.


Forum|alt.badge.img

If I put a filter_term, then I get back a result but if I don't, I get back no results.

I can dig into the SDK a little more...

 

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();
var adminClient = boxJWT.AdminClient(adminToken);
var externalUsers = await adminClient.UsersManager.GetEnterpriseUsersAsync(
        "", 0, 1000, null, "external", null, false);

externalUsers.Entries.ForEach(i =>
{
     Console.WriteLine("\t{0}", i.Login);
});