The request requires higher privileges than provided by the access token
Hi,
I am trying to to get enterprise users.I am using the following piece of code.
var adminToken = boxJWT.AdminToken();
var adminClient = boxJWT.AdminClient(adminToken);
var users=await adminClient.UsersManager.GetEnterpriseUsersAsync();
but when i attempt to make a call to get users i get this
Bearer realm="Service", error="insufficient_scope", error_description="The request requires higher privileges than provided by the access token."
i am making this call with the user account having co-Admin role.
box account settings:
![setting](https://cloud.githubusercontent.com/assets/24496525/21075234/7e6d75b0-bf**removed**e6-97ee-7cc82431b46b.png)
Second Scenario:
I Changed the authentication to 3legged OAuth 2.0 Authentication
i used this piece of code to create BoxClient object
var session = new OAuthSession(accessToken, refreshToken, expireTime, tokenType);
BoxClient client = new BoxClient(boxConfig, session,asUser:"123456");
var items =await client .FoldersManager.GetFolderItemsAsync("0");
In the case i am making AsUser call to get contents of that user but in this case i am also getting same error "The request requires higher privileges than provided by the access token"
I dont know what i am missing while making Box API call.Please help
-
I'm attempting to use the API with JWT to create an App User as described in https://docs.box.com/v2.0/docs/app-users but I'm getting the error "The request requires higher privileges than provided by the access token."
My settings are:
Authentication Type: Server Authentication (OAuth2.0 with JWT)
User Access: App Users
Scopes: Content: Read and write all files and folders stored in Box
Scopes: Enterprise: Manage app users
Advanced Features: Generate access tokens for users
I've also tried it with in addition to above, Advanced Features: Perform actions on behalf of users
Using a generated developer token, does work.
Thanks.
Please sign in to leave a comment.
Comments
3 comments